mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-13 16:38:44 +00:00
751454d7a8
Replaces font-sizes that are between 12-14 px with ones that equal 14px. This involved converting some values to rems as well as changing their size. @font-size-tabs (a computed 13px value) is removed in favour of unit( @font-size-small, rem). This removal requires the following changes: * Removing max-height & box-sizing from tabs, since they used @font-size-tabs for size calculations * modifying .mixin-vector-arrowed-dropdown-toggle() to use `unit( 12 / @font-size-browser, rem )` instead of `unit( 16 / @font-size-tabs / @font-size-browser, em )` * Changes to the position of `.vector-toc-toggle` since it's width/height depended on .mixin-vector-arrowed-dropdown-toggle() Opportunistic refactor: - `.mixin-vector-legacy-menu-heading-arrow()` is removed from Zebra Expected visual changes: font-sizes below refer to computed values, actual values are now set in rems. * Text in tabs is 14px not 13px * #siteSub is 14px not 12.8px * #contentSub is 14px not 11.76px * #contentSub line height is default, not 1.2 * dropdown [hide] labels are 14px instead of 13px ************************* *****VISUAL CHANGE***** ************************* : 91 changes in Pixel due to content being pushed down due to bigger font-size in toolbar. Bug: T346062 Bug: T261334 Change-Id: I6cfc800bb8dfed206670e5365bdc55e5d7357a4a
118 lines
3.5 KiB
Plaintext
118 lines
3.5 KiB
Plaintext
/**
|
|
* Less mixins.
|
|
*/
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
.mixin-vector-page-container-sizing() {
|
|
// Set a min-width to make explicit we do not support anything below this threshold.
|
|
// For devices too small, they should be more useable with horizontal scrolling.
|
|
// e.g. Portrait on an iPad
|
|
min-width: @min-width-supported;
|
|
max-width: @max-width-page-container;
|
|
padding-left: @padding-horizontal-page-container;
|
|
padding-right: @padding-horizontal-page-container;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.mixin-vector-arrowed-dropdown-toggle() {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
|
|
&::after {
|
|
content: '';
|
|
background: url( ../skins.vector.styles/images/arrow-down.svg ) 100% 50% no-repeat;
|
|
width: unit( 16 / @font-size-browser, rem );
|
|
height: unit( 16 / @font-size-browser, rem );
|
|
// https://phabricator.wikimedia.org/T319070#8284272
|
|
margin-left: -1px;
|
|
}
|
|
}
|
|
|
|
.mixin-vector-content-box() {
|
|
background-color: @background-color-base;
|
|
border: @border-width-base @border-style-base @border-color-content-box;
|
|
border-radius: @border-radius-content-box;
|
|
}
|
|
|
|
.mixin-vector-dropdown-menu() {
|
|
.mixin-vector-content-box();
|
|
padding: @padding-horizontal-dropdown-menu @padding-vertical-dropdown-menu;
|
|
font-size: @font-size-dropdown;
|
|
box-shadow: 0 2px 6px -1px rgba( 0, 0, 0, 0.2 );
|
|
transition-property: opacity;
|
|
transition-duration: @transition-duration-base;
|
|
// TODO Add consistent min/max values for dropdowns in T316055
|
|
width: max-content;
|
|
max-width: 200px;
|
|
}
|
|
|
|
.mixin-vector-dropdown-menu-item() {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: @padding-vertical-dropdown-menu-item 0;
|
|
|
|
&:not( .mw-selflink ):visited {
|
|
color: @color-link;
|
|
}
|
|
|
|
.vector-icon {
|
|
margin-right: @spacing-35;
|
|
}
|
|
|
|
&.selected a,
|
|
&.selected a:visited {
|
|
color: @color-link-selected;
|
|
}
|
|
}
|
|
|
|
.mixin-page-container() {
|
|
max-width: @max-width-page-container;
|
|
// Set a min-width to make explicit we do not support anything below this threshold.
|
|
// For devices too small, they should be more useable with horizontal scrolling.
|
|
// e.g. Portrait on an iPad
|
|
min-width: @min-width-supported;
|
|
margin: 0 auto;
|
|
padding-left: @padding-horizontal-page-container;
|
|
padding-right: @padding-horizontal-page-container;
|
|
background-color: @background-color-page-container;
|
|
box-sizing: border-box;
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
padding-left: @padding-horizontal-page-container-desktop;
|
|
padding-right: @padding-horizontal-page-container-desktop;
|
|
}
|
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
|
padding-left: @padding-horizontal-page-container-desktop-wide;
|
|
padding-right: @padding-horizontal-page-container-desktop-wide;
|
|
}
|
|
}
|
|
|
|
.mixin-vector-scrollable-with-fade() {
|
|
overflow-y: auto;
|
|
|
|
&::after {
|
|
content: '';
|
|
display: block;
|
|
position: sticky;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
width: ~'calc( 100% + @{padding-vertical-dropdown-menu} )';
|
|
height: @padding-vertical-dropdown-menu;
|
|
margin-top: -@padding-vertical-dropdown-menu;
|
|
margin-left: -@padding-vertical-dropdown-menu;
|
|
transform: translate( 0, @padding-vertical-dropdown-menu );
|
|
background: linear-gradient( rgba( 255, 255, 255, 0 ), @background-color-page-container );
|
|
background-repeat: no-repeat;
|
|
pointer-events: none; // Make the link below the fade clickable
|
|
}
|
|
}
|
|
|
|
.mixin-vector-dropdown-content-flip() {
|
|
// Flip dropdown horizontal alignment
|
|
// FIXME: !important necessary for flipping user links dropdown, remove after VectorZebraDesign is default
|
|
left: auto !important; /* stylelint-disable-line declaration-no-important */
|
|
right: 0;
|
|
}
|