mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-05 12:39:51 +00:00
42f863a936
- Update TOC bottom padding to match spec in T304166. Before (30px): https://phabricator.wikimedia.org/F35312302 After (20px): https://phabricator.wikimedia.org/F35312299 - Rearrange/combine some selectors in TableOfContents.less - Delete some unnecessary styles/selectors - Rename variables in TableOfContents.less Change-Id: Ifffc434dcab4256a0c3ae8faf43a342935b820ff
83 lines
1.7 KiB
Plaintext
83 lines
1.7 KiB
Plaintext
@import '../../common/variables.less';
|
|
|
|
@selector-collapsed-toc-closed: ~'#vector-toc-collapsed-checkbox:not( :checked )';
|
|
|
|
#vector-toc-collapsed-button {
|
|
display: none;
|
|
}
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
#vector-toc-collapsed-button,
|
|
.sidebar-toc {
|
|
z-index: @z-index-menu;
|
|
}
|
|
|
|
#vector-toc-collapsed-button {
|
|
display: block;
|
|
float: left;
|
|
margin-right: 4px;
|
|
margin-left: -10px;
|
|
// Reduce padding to fit with page title
|
|
padding: 7px 10px 7px 10px;
|
|
|
|
// Override background color for when the TOC is overlaps content
|
|
// as a sticky element when the page is scrolled down.
|
|
background-color: @background-color-base;
|
|
|
|
&:hover,
|
|
&:active {
|
|
background-color: @colorGray15;
|
|
}
|
|
}
|
|
|
|
.mw-table-of-contents-container {
|
|
position: relative;
|
|
|
|
.vector-layout-legacy & {
|
|
// !important needed to override rules in screen.less
|
|
top: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
}
|
|
}
|
|
|
|
.sidebar-toc {
|
|
position: absolute;
|
|
top: 44px;
|
|
left: -2px;
|
|
// !important needed to override rules in Sidebar.less
|
|
margin-top: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
|
|
// Dropdown styles
|
|
background-color: @color-base--inverted;
|
|
border: @border-width-base @border-style-base @border-color-base;
|
|
|
|
// Remove TOC fade
|
|
&:after {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@{selector-collapsed-toc-closed} ~ .mw-table-of-contents-container .sidebar-toc {
|
|
// Hide the TOC when the button is not checked
|
|
display: none;
|
|
}
|
|
|
|
.vector-below-page-title {
|
|
#vector-toc-collapsed-button,
|
|
.sidebar-toc {
|
|
position: fixed;
|
|
}
|
|
|
|
#vector-toc-collapsed-button {
|
|
top: 0;
|
|
left: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.sidebar-toc {
|
|
// TOC button height
|
|
top: 36px;
|
|
left: 6px;
|
|
}
|
|
}
|
|
}
|