2022-06-02 22:09:28 +00:00
|
|
|
//
|
|
|
|
// Grid layout
|
|
|
|
//
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
// aligns left side of column with hamburger icon.
|
|
|
|
.mixin-column-align-width-hamburger-icon() {
|
|
|
|
// Align the content with the hamburger icon
|
|
|
|
padding: 0 0 0 @margin-horizontal-sidebar-button-icon;
|
2022-06-13 21:07:36 +00:00
|
|
|
}
|
|
|
|
|
2022-06-02 22:09:28 +00:00
|
|
|
.vector-layout-grid {
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( max-width: @max-width-mobile ) {
|
2022-06-02 22:09:28 +00:00
|
|
|
.mw-header {
|
|
|
|
// Should match grid-template-rows definition below.
|
|
|
|
height: 66px;
|
|
|
|
// Should match row-gap below.
|
|
|
|
margin-bottom: 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-tablet ) {
|
2022-06-02 22:09:28 +00:00
|
|
|
.mw-page-container-inner {
|
|
|
|
display: grid;
|
|
|
|
width: 100%;
|
2022-06-24 23:34:28 +00:00
|
|
|
grid-template: ~'66px min-content 1fr 1fr / 232px 20px minmax(0, 1fr)';
|
2022-06-02 22:09:28 +00:00
|
|
|
grid-template-areas: 'header header header'
|
|
|
|
'sidebar gutter content'
|
2022-06-24 23:34:28 +00:00
|
|
|
'toc gutter content'
|
2022-06-02 22:50:52 +00:00
|
|
|
'footer footer footer';
|
2022-06-02 22:09:28 +00:00
|
|
|
row-gap: 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body {
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
|
2022-06-24 23:34:28 +00:00
|
|
|
.mw-table-of-contents-container {
|
|
|
|
grid-area: toc;
|
|
|
|
}
|
|
|
|
|
2022-06-02 22:09:28 +00:00
|
|
|
.mw-header {
|
|
|
|
grid-area: header;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-sidebar-container {
|
|
|
|
grid-area: sidebar;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-content-container {
|
|
|
|
grid-area: content;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-footer-container {
|
|
|
|
grid-area: footer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-desktop ) {
|
2022-06-02 22:09:28 +00:00
|
|
|
.mw-page-container-inner {
|
|
|
|
grid-template-columns: ~'284px 20px 1fr';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-13 21:07:36 +00:00
|
|
|
/**
|
|
|
|
* Special handling for sidebar when table of contents is visible.
|
2022-06-24 16:04:22 +00:00
|
|
|
* This only applies between the tablet and desktop breakpoints.
|
|
|
|
* It shouldn't apply on mobile as it will lead to misalignment with the hamburger icon.
|
2022-06-13 21:07:36 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: ( @min-width-tablet ) ) and ( max-width: @max-width-tablet ) {
|
2022-06-13 21:07:36 +00:00
|
|
|
@{selector-sidebar-container-sidebar-closed} {
|
2022-06-23 21:33:47 +00:00
|
|
|
.mw-navigation {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-06-02 22:09:28 +00:00
|
|
|
|
|
|
|
& + .mw-content-container {
|
2022-06-13 21:07:36 +00:00
|
|
|
.mixin-column-full-width();
|
2022-06-24 16:04:22 +00:00
|
|
|
.mixin-column-align-width-hamburger-icon();
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-13 21:07:36 +00:00
|
|
|
|
|
|
|
@{selector-sidebar-no-toc-sidebar-closed} {
|
|
|
|
& + .mw-content-container {
|
|
|
|
.mixin-column-full-width();
|
2022-06-24 16:04:22 +00:00
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: ( @min-width-tablet ) ) and ( max-width: @max-width-tablet ) {
|
2022-06-24 16:04:22 +00:00
|
|
|
.mixin-column-align-width-hamburger-icon();
|
|
|
|
}
|
2022-06-13 21:07:36 +00:00
|
|
|
}
|
|
|
|
}
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|