2022-06-02 22:09:28 +00:00
|
|
|
//
|
|
|
|
// Grid layout
|
|
|
|
//
|
2022-06-30 22:37:08 +00:00
|
|
|
|
2022-08-24 16:54:31 +00:00
|
|
|
@height-header: 66px;
|
2022-06-30 22:37:08 +00:00
|
|
|
@width-gutter: 20px;
|
2022-08-24 16:54:31 +00:00
|
|
|
@padding-top-footer: 50px;
|
2022-06-30 22:37:08 +00:00
|
|
|
|
2022-06-24 16:04:22 +00:00
|
|
|
// Makes a column span entire page
|
2022-06-13 21:07:36 +00:00
|
|
|
.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%;
|
2022-06-24 16:04:22 +00:00
|
|
|
box-sizing: border-box;
|
2022-08-15 14:42:34 +00:00
|
|
|
max-width: @max-width-content-container;
|
2022-06-24 16:04:22 +00:00
|
|
|
}
|
|
|
|
|
2022-06-30 22:28:09 +00:00
|
|
|
// aligns left side of column with hamburger icon.
|
|
|
|
.mixin-column-align-width-hamburger-icon() {
|
|
|
|
// Align the content with the hamburger icon
|
|
|
|
padding-left: 8px;
|
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.mw-content-container {
|
2022-08-19 13:09:51 +00:00
|
|
|
max-width: @max-width-content-container;
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
// For container logic specific to special pages and history pages.
|
|
|
|
.skin-vector-disable-max-width & {
|
|
|
|
// Allow the max-width of content on history/special pages to be wider than
|
|
|
|
// the max-width of content on article pages.
|
|
|
|
// Note, we don't disable the max-width on .mw-article-toolbar-container intentionally
|
|
|
|
// to support easier navigation between tabs.
|
|
|
|
// See T293441 for further information on that.
|
2022-08-22 10:33:10 +00:00
|
|
|
// Both rules are !important as they are final. Max-width on a page should be restored by removing the `skin-vector-disable-max-width`,
|
|
|
|
// preferably by modification to the feature flag VectorMaxWidthOptions. Code should never attempt to override this rule.
|
|
|
|
/* stylelint-disable-next-line declaration-no-important */
|
|
|
|
max-width: none !important;
|
|
|
|
/* stylelint-disable-next-line declaration-no-important */
|
|
|
|
width: 100% !important;
|
2022-06-24 20:17:36 +00:00
|
|
|
}
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
2022-06-24 20:17:36 +00:00
|
|
|
|
2022-08-24 16:54:31 +00:00
|
|
|
.mw-footer-container {
|
|
|
|
padding-top: @padding-top-footer;
|
|
|
|
padding-bottom: 82px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
.mw-header {
|
|
|
|
// Match header styles applied by grid-template-rows and row-gap
|
|
|
|
// when grid is disabled on lower resolutions
|
|
|
|
height: @height-header;
|
|
|
|
margin-bottom: @grid-row-gap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.mw-page-container-inner {
|
|
|
|
display: grid;
|
|
|
|
width: 100%;
|
2022-08-24 16:54:31 +00:00
|
|
|
grid-template: ~'@{height-header} min-content min-content 1fr min-content / 232px @{width-gutter} minmax(0, 1fr)';
|
2022-08-04 20:05:36 +00:00
|
|
|
grid-template-areas: 'header header header'
|
|
|
|
'sitebanner sitebanner sitebanner'
|
|
|
|
'sidebar gutter content'
|
|
|
|
'toc gutter content'
|
|
|
|
'footer footer footer';
|
2022-08-24 16:54:31 +00:00
|
|
|
row-gap: @grid-row-gap;
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body {
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#siteNotice {
|
|
|
|
grid-area: sitebanner;
|
2022-06-24 20:17:36 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.mw-table-of-contents-container {
|
|
|
|
grid-area: toc;
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.mw-header {
|
|
|
|
grid-area: header;
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.vector-sidebar-container {
|
|
|
|
grid-area: sidebar;
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.mw-content-container {
|
|
|
|
grid-area: content;
|
|
|
|
}
|
|
|
|
|
2022-08-15 14:42:34 +00:00
|
|
|
// FIXME: Remove padding in favor of updating the header icons itself and making mw-body spacing consistent
|
|
|
|
// This padding complicates the collapsed TOC menu styles and contributes to inconsistent spacing
|
2022-08-04 20:05:36 +00:00
|
|
|
// with sidebar closed, when no table of contents, align with hamburger menu
|
|
|
|
@{selector-sidebar-no-toc-sidebar-closed} ~ .mw-content-container {
|
|
|
|
.mixin-column-align-width-hamburger-icon();
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-footer-container {
|
|
|
|
grid-area: footer;
|
2022-08-24 16:54:31 +00:00
|
|
|
padding-top: @padding-top-footer - @grid-row-gap;
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
|
|
|
.mw-page-container-inner {
|
|
|
|
/* Use of minmax is important to restrict the maximum grid column width
|
|
|
|
more information: T314756 */
|
|
|
|
grid-template-columns: ~'284px @{width-gutter} minmax(0, 1fr)';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@{selector-sidebar-no-toc-sidebar-closed} {
|
|
|
|
& ~ .mw-content-container {
|
|
|
|
.mixin-column-full-width();
|
2022-06-13 21:07:36 +00:00
|
|
|
}
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
2022-08-15 14:42:34 +00:00
|
|
|
|
2022-08-17 18:57:38 +00:00
|
|
|
.vector-toc-collapsed @{selector-main-menu-closed} {
|
|
|
|
& ~ .mw-content-container,
|
|
|
|
& ~ .mw-table-of-contents-container {
|
2022-08-15 14:42:34 +00:00
|
|
|
.mixin-column-full-width();
|
|
|
|
}
|
|
|
|
}
|