mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-09-23 18:28:34 +00:00
Table of contents should not trigger reflows in layout
Make sure the table of contents doesn't change size when it is enhanced by JavaScript. Take opportunity to fix alignment of table of contents based on 20x20 icons (previously 24x24) and icon/heading alignment. Bug: T268787 Change-Id: I4ac26068687579484381af5b08e680e3a65f8f1e
This commit is contained in:
parent
d3fbbaf9a5
commit
5d6ffe7072
|
@ -11,11 +11,29 @@
|
|||
}
|
||||
|
||||
.toctogglecheckbox ~ ul {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.toctogglecheckbox:checked ~ ul {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
padding-bottom: 20px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.toctitle {
|
||||
padding: 0 25px 0 32px;
|
||||
|
||||
.mw-ui-icon {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.toctogglespan + .mw-ui-icon {
|
||||
top: 8px;
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.toctogglelabel {
|
||||
|
@ -49,10 +67,11 @@
|
|||
}
|
||||
|
||||
> ul {
|
||||
// Account for the icon spaces left and right.
|
||||
margin: 0 unit( @icon-glyph-size-md / @font-size-minerva-small, em ) 0 32px;
|
||||
// Reset `.client-js .toc > ul`.
|
||||
padding-left: 0;
|
||||
font-size: @font-size-minerva-small;
|
||||
margin-left: 52px;
|
||||
margin-right: 24px;
|
||||
padding: 0 0 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
|
|
Loading…
Reference in a new issue