mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-04 20:18:57 +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
153 lines
3.7 KiB
Plaintext
153 lines
3.7 KiB
Plaintext
/**
|
|
* Checkbox hack used by collapsed TOC on narrow viewports for no JS users.
|
|
* Although it's display:none, the :checked state is still affected when clicking
|
|
* the associated label.
|
|
*/
|
|
#vector-toc-collapsed-checkbox {
|
|
display: none;
|
|
}
|
|
|
|
.vector-toc {
|
|
max-height: 75vh;
|
|
box-sizing: border-box;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
background-color: @background-color-page-container;
|
|
font-size: @font-size-base;
|
|
|
|
.vector-pinnable-header-label {
|
|
// Override heading element styles in elements.less
|
|
overflow: unset;
|
|
}
|
|
|
|
.vector-toc-numb {
|
|
display: none;
|
|
}
|
|
|
|
.vector-toc-toggle {
|
|
// For no-js users, toggling is disabled and icon is hidden
|
|
display: none;
|
|
position: absolute;
|
|
top: 1px; // visually center icon
|
|
left: -@spacing-subsection-toggle; // leaves 6px between icon + text
|
|
transition: @transition-duration-base;
|
|
color: transparent;
|
|
cursor: pointer;
|
|
// Reset <button> default browser styles
|
|
border: 0;
|
|
background: none;
|
|
// Override .cdx-button styles
|
|
min-width: @spacing-subsection-toggle;
|
|
min-height: @spacing-subsection-toggle;
|
|
padding: 0;
|
|
}
|
|
|
|
.vector-toc-link {
|
|
word-break: break-word;
|
|
color: @color-link;
|
|
display: block;
|
|
}
|
|
|
|
// Highlight and bold active sections, active top sections that are unexpanded
|
|
// and active top sections that are the only active element.
|
|
.vector-toc-list-item-active,
|
|
.vector-toc-level-1-active:not( .vector-toc-list-item-expanded ),
|
|
.vector-toc-list-item-active.vector-toc-level-1-active {
|
|
> .vector-toc-link {
|
|
// Highlight active section
|
|
color: @color-base;
|
|
font-weight: bold;
|
|
|
|
.vector-toc-text {
|
|
// Increase width to prevent line wrapping due to bold text
|
|
// Avoid applying on link element to avoid focus indicator changing size
|
|
width: ~'calc( 100% + @{padding-horizontal-dropdown-menu-item} )';
|
|
}
|
|
}
|
|
}
|
|
|
|
// Highlight active top sections that contain an active section
|
|
.vector-toc-level-1-active:not( .vector-toc-list-item-active ) > .vector-toc-link {
|
|
color: @color-base;
|
|
}
|
|
|
|
.vector-toc-text {
|
|
// Match .mixin-vector-dropdown-menu-item() vertical padding
|
|
padding: @padding-vertical-dropdown-menu-item 0;
|
|
}
|
|
|
|
.vector-toc-contents,
|
|
.vector-toc-list {
|
|
margin: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.vector-toc-list-item {
|
|
display: block;
|
|
position: relative;
|
|
list-style-type: none;
|
|
padding-left: 8px;
|
|
margin: 0;
|
|
|
|
&.vector-toc-level-1 {
|
|
padding-left: 0;
|
|
}
|
|
|
|
a {
|
|
font-size: inherit;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Collapse ToC sections by default, excluding no-js
|
|
&.client-js .vector-toc {
|
|
.vector-toc-level-1 .vector-toc-list-item {
|
|
display: none;
|
|
}
|
|
|
|
.vector-toc-level-1.vector-toc-list-item-expanded .vector-toc-list-item {
|
|
display: block;
|
|
}
|
|
|
|
.vector-toc-toggle {
|
|
display: block;
|
|
}
|
|
|
|
.vector-toc-level-1.vector-toc-list-item-expanded .vector-toc-toggle {
|
|
transform: rotate( 0deg );
|
|
}
|
|
}
|
|
|
|
&.client-js body.ltr .vector-toc .vector-toc-toggle {
|
|
transform: rotate( -90deg );
|
|
}
|
|
|
|
&.client-js body.rtl .vector-toc .vector-toc-toggle {
|
|
transform: rotate( 90deg );
|
|
}
|
|
|
|
// Ensure there is only 1 table of contents landmark at anytime
|
|
.vector-toc-landmark {
|
|
display: none;
|
|
}
|
|
|
|
&.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ) .vector-page-titlebar,
|
|
&.vector-feature-toc-pinned-clientpref-0 .vector-sticky-header-visible .vector-sticky-header-context-bar,
|
|
&.vector-feature-toc-pinned-clientpref-1 .mw-page-container-inner {
|
|
> .vector-toc-landmark {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
// On smaller viewports the TOC will always be moved to the page titlebar via JS
|
|
// regardless of the TOC pinned classes
|
|
@media ( max-width: @max-width-tablet ) {
|
|
&.client-js .vector-page-titlebar .vector-toc-landmark {
|
|
display: block;
|
|
}
|
|
|
|
&.client-js .mw-table-of-contents-container.vector-toc-landmark {
|
|
display: none;
|
|
}
|
|
}
|