mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 01:20:07 +00:00
Merge "Simplify grid styles now that grid is no longer needed to position ToC"
This commit is contained in:
commit
a33dffb281
|
@ -2,8 +2,6 @@
|
|||
// Grid layout
|
||||
//
|
||||
|
||||
@width-sidebar-end: unit( 185px / @font-size-browser, em );
|
||||
|
||||
// Match styles between TOC and fade element to ensure the fade covers the correct area
|
||||
// This is expressed in pixels to support different font sizes since our layout is currently
|
||||
// expressed in pixels. See T313817.
|
||||
|
@ -70,14 +68,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mixin-horizontally-centered() {
|
||||
grid-column: mainMenu / pageContent;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mw-content-container,
|
||||
.mw-table-of-contents-container {
|
||||
.vector-feature-page-tools-disabled & {
|
||||
|
@ -100,28 +90,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Our usage of grid to position the ToC when it is collapsed in the page title
|
||||
// requires us to manually define the max width depending on the number of columns.
|
||||
// This also requires us to define a set width for the sidebar end column
|
||||
// FIXME: Remove this max-width mess with T318013
|
||||
@{selector-sidebar-no-toc-sidebar-closed} ~ .mw-content-container {
|
||||
.mixin-horizontally-centered();
|
||||
max-width: @max-width-content-container;
|
||||
|
||||
.vector-feature-page-tools-enabled.vector-feature-page-tools-pinned-enabled & {
|
||||
max-width: @max-width-content-container + @width-sidebar-end;
|
||||
// Horizontally center content when column start is empty (i.e. no pinned ToC or pinned main menu)
|
||||
.vector-feature-page-tools-disabled {
|
||||
@{selector-sidebar-no-toc-sidebar-closed},
|
||||
&.vector-toc-unpinned @{selector-main-menu-closed} {
|
||||
& ~ .mw-content-container {
|
||||
grid-column: mainMenu / pageContent;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vector-toc-unpinned @{selector-main-menu-closed} {
|
||||
& ~ .mw-content-container,
|
||||
& ~ .mw-table-of-contents-container {
|
||||
.mixin-horizontally-centered();
|
||||
max-width: @max-width-content-container;
|
||||
|
||||
.vector-feature-page-tools-enabled.vector-feature-page-tools-pinned-enabled& {
|
||||
max-width: @max-width-content-container + @width-sidebar-end;
|
||||
}
|
||||
// Horizontally center content when column start is empty (i.e. no pinned ToC or pinned main menu)
|
||||
.vector-feature-page-tools-enabled {
|
||||
&.vector-main-menu-unpinned .vector-sidebar-container-no-toc ~ .mw-content-container,
|
||||
&.vector-toc-unpinned.vector-main-menu-unpinned .mw-content-container {
|
||||
grid-column: mainMenu / pageContent;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue