mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-26 00:25:40 +00:00
5beadc4bc2
The 'mw-workspace-container' class is present on both the footer and the sidebar. The CSS rule should only hide the latter. When there is no table of contents on the page, and the sidebar is closed, the content should always span the grid columns and the sidebar container closed. Bug: T293443 Change-Id: I852b9024fbd21339b7c78dbb4deba811ab17c7e7
84 lines
1.7 KiB
Plaintext
84 lines
1.7 KiB
Plaintext
//
|
|
// Grid layout
|
|
//
|
|
|
|
.mixin-column-full-width() {
|
|
grid-column: sidebar / content;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
// Needed for minimal content e.g. one word articles.
|
|
width: 100%;
|
|
}
|
|
|
|
.vector-layout-grid {
|
|
@media ( max-width: @width-breakpoint-tablet ) {
|
|
.mw-header {
|
|
// Should match grid-template-rows definition below.
|
|
height: 66px;
|
|
// Should match row-gap below.
|
|
margin-bottom: 24px;
|
|
}
|
|
}
|
|
|
|
@media ( min-width: @width-breakpoint-tablet ) {
|
|
.mw-page-container-inner {
|
|
display: grid;
|
|
width: 100%;
|
|
grid-template: ~'66px auto 1fr / 232px 20px minmax(0, 1fr)';
|
|
grid-template-areas: 'header header header'
|
|
'sidebar gutter content'
|
|
'footer footer footer';
|
|
row-gap: 24px;
|
|
}
|
|
|
|
.mw-body {
|
|
padding-left: 0;
|
|
}
|
|
|
|
.mw-header {
|
|
grid-area: header;
|
|
}
|
|
|
|
.vector-sidebar-container {
|
|
grid-area: sidebar;
|
|
}
|
|
|
|
.mw-content-container {
|
|
grid-area: content;
|
|
}
|
|
|
|
.mw-footer-container {
|
|
grid-area: footer;
|
|
}
|
|
}
|
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
|
.mw-page-container-inner {
|
|
grid-template-columns: ~'284px 20px 1fr';
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Special handling for sidebar when table of contents is visible.
|
|
* Cover the cases where:
|
|
* 1) the main menu is closed, there is no TOC in the sidebar
|
|
* 2) the main menu is closed, the sidebar TOC is hidden at the breakpoint.
|
|
* In these situation content should span the entire page.
|
|
*/
|
|
@media ( max-width: @width-breakpoint-desktop ) {
|
|
@{selector-sidebar-container-sidebar-closed} {
|
|
display: none;
|
|
|
|
& + .mw-content-container {
|
|
.mixin-column-full-width();
|
|
}
|
|
}
|
|
}
|
|
|
|
@{selector-sidebar-no-toc-sidebar-closed} {
|
|
& + .mw-content-container {
|
|
.mixin-column-full-width();
|
|
}
|
|
}
|
|
}
|