mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-19 17:21:07 +00:00
dd154b4ea7
The values have slightly changed: - Tablet breakpoint is decreased by 80px, pushing lesser devices into a mobile only experience but should make barely a difference to vast majority of our users. - Biggest difference is in `min-width-breakpoint-desktop`, which is increased by 120px in comparison to `@width-breakpoint-desktop: 1000px` Also removing one out-dated feature phone clause. TECHNICAL CHANGES: * The previous breakpoint was tied to the maximum content width. The previous maximum content width is preserved, and several media queries are adjusted to make use of it. * The header (logo) is not optimized for 640px-720px. For now a temporary fix is but in place which will be investigated as part of T366859 VISUAL CHANGES: * 6 visual changes which improve alignment in language and visual editor overlay and diffs (where wikidiff2 is not installed) Bug: T349793 Depends-On: I3afba8c51f60de9271054499bfa3ffbcc1a9d779 Change-Id: I9552d8ad7509aae90e15edda26e786465773d3ac
103 lines
2.1 KiB
Plaintext
103 lines
2.1 KiB
Plaintext
@import '../../../minerva.less/minerva.variables.less';
|
|
|
|
@toc-large-icon: 44px;
|
|
@toc-small-icon: 34px;
|
|
|
|
.toc {
|
|
display: none;
|
|
position: relative;
|
|
margin: 1em 0;
|
|
padding: 0 1em 1em 1em;
|
|
background-color: var( --background-color-interactive-subtle );
|
|
border: @border-width-base @border-style-base var( --border-color-muted );
|
|
box-sizing: border-box;
|
|
|
|
// We need high specificity to override .content ul
|
|
&.toc > ul {
|
|
// Account for the icon spaces left and right.
|
|
// margin: 0 @toc-small-icon 0 @toc-large-icon;
|
|
font-size: @font-size-minerva-small;
|
|
// Reset `.client-js .toc > ul`.
|
|
padding-left: 0;
|
|
}
|
|
|
|
// We need high specificity to override .content ul
|
|
&.toc ul {
|
|
list-style: none;
|
|
// break long headings like urls
|
|
word-break: break-word;
|
|
}
|
|
}
|
|
|
|
.toctitle {
|
|
@toctitle-vertical-padding: 1.4em / 2;
|
|
font-weight: bold;
|
|
display: flex;
|
|
// Force vertical centering on title by making this full height
|
|
align-items: center;
|
|
// Ensure height for icon
|
|
min-height: @toc-large-icon;
|
|
|
|
// We need high specificity to override .content h2
|
|
&.toctitle h2 {
|
|
display: inline-block;
|
|
font-family: @font-family-base;
|
|
font-size: unit( 18/16, em );
|
|
vertical-align: middle;
|
|
flex-grow: 1;
|
|
margin-left: @toc-large-icon;
|
|
margin-right: @toc-large-icon;
|
|
}
|
|
}
|
|
|
|
.tocnumber {
|
|
display: none;
|
|
}
|
|
|
|
.toctogglelabel {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
right: 0;
|
|
height: @toc-large-icon;
|
|
z-index: @z-index-above-content;
|
|
}
|
|
|
|
// Do stuff we only need to do with JS
|
|
// Collapsing and reserving space for the JS icons
|
|
.client-js .toc {
|
|
// Reset padding, because we need to reserve space for icons
|
|
padding: 0;
|
|
|
|
> ul {
|
|
// Account for the icon spaces left and right.
|
|
margin: 0 @toc-small-icon 0 @toc-large-icon;
|
|
}
|
|
|
|
.toctogglecheckbox ~ ul {
|
|
visibility: hidden;
|
|
height: 0;
|
|
}
|
|
|
|
.toctogglecheckbox:checked ~ ul {
|
|
visibility: visible;
|
|
padding-bottom: 20px;
|
|
height: auto;
|
|
}
|
|
|
|
.toctogglelabel {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
@media screen and ( min-width: @min-width-breakpoint-tablet ) {
|
|
.toc {
|
|
// Reset the rule for mobile mode
|
|
display: table;
|
|
|
|
.toctitle {
|
|
visibility: visible;
|
|
}
|
|
}
|
|
}
|