2022-06-02 22:09:28 +00:00
|
|
|
//
|
|
|
|
// Grid layout
|
|
|
|
//
|
2022-06-30 22:37:08 +00:00
|
|
|
|
2022-10-20 21:52:21 +00:00
|
|
|
@width-sidebar-end: unit( 185px / @font-size-browser, em );
|
2022-06-24 20:17:36 +00:00
|
|
|
|
2022-11-30 22:22:33 +00:00
|
|
|
// 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.
|
|
|
|
// FIXME: Remove .vector-sticky-toc-container selectors after I85aec387f87126a17e760fd9fd10e10572ff3152 has been in prod for 5 days
|
|
|
|
.vector-sticky-toc-container .sidebar-toc:after,
|
|
|
|
.vector-sticky-toc-container .sidebar-toc,
|
|
|
|
#vector-toc-pinned-container .sidebar-toc:after,
|
|
|
|
#vector-toc-pinned-container .sidebar-toc,
|
|
|
|
.vector-feature-page-tools-disabled .vector-main-menu,
|
|
|
|
.vector-main-menu-container .vector-main-menu {
|
|
|
|
// T305069 Layout adjustments of sidebar elements
|
|
|
|
// Align the left edge of main menu with the main menu button.
|
|
|
|
width: @width-sidebar-px;
|
|
|
|
|
|
|
|
// Align the left edge of main menu with the main menu button icon.
|
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
|
|
|
width: @width-sidebar-px-wide;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.mw-page-container-inner {
|
|
|
|
display: grid;
|
|
|
|
width: 100%;
|
2022-09-01 16:23:55 +00:00
|
|
|
column-gap: 8px; // 8px + 12px (.mw-body padding-left) = 20px total spacing
|
|
|
|
grid-template: ~'min-content min-content min-content 1fr min-content / 232px minmax(0, 1fr)';
|
|
|
|
grid-template-areas: 'header header'
|
2022-10-20 21:52:21 +00:00
|
|
|
'siteNotice siteNotice'
|
|
|
|
'mainMenu pageContent'
|
|
|
|
'toc pageContent'
|
2022-09-01 16:23:55 +00:00
|
|
|
'footer footer';
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
|
|
|
|
2022-08-22 20:23:14 +00:00
|
|
|
.vector-sitenotice-container {
|
2022-10-20 21:52:21 +00:00
|
|
|
grid-area: siteNotice;
|
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-10-17 20:09:53 +00:00
|
|
|
.vector-main-menu-container {
|
2022-10-20 21:52:21 +00:00
|
|
|
grid-area: mainMenu;
|
2022-06-02 22:09:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 20:05:36 +00:00
|
|
|
.mw-content-container {
|
2022-10-20 21:52:21 +00:00
|
|
|
grid-area: pageContent;
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-footer-container {
|
|
|
|
grid-area: footer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@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 */
|
2022-09-01 16:23:55 +00:00
|
|
|
grid-template-columns: ~'284px minmax(0, 1fr)';
|
2022-08-04 20:05:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-20 21:52:21 +00:00
|
|
|
.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 & {
|
|
|
|
max-width: @max-width-content-container;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-feature-limited-width-disabled &,
|
2022-11-15 19:34:12 +00:00
|
|
|
.vector-feature-limited-width-content-disabled & {
|
2022-10-20 21:52:21 +00:00
|
|
|
// 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 .vector-page-toolbar-container intentionally
|
|
|
|
// to support easier navigation between tabs.
|
|
|
|
// See T293441 for further information on that.
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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-page-tools-pinned & {
|
|
|
|
max-width: @max-width-content-container + @width-sidebar-end;
|
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-11-21 20:46:04 +00:00
|
|
|
.vector-toc-unpinned @{selector-main-menu-closed} {
|
2022-08-17 18:57:38 +00:00
|
|
|
& ~ .mw-content-container,
|
|
|
|
& ~ .mw-table-of-contents-container {
|
2022-10-20 21:52:21 +00:00
|
|
|
.mixin-horizontally-centered();
|
|
|
|
max-width: @max-width-content-container;
|
|
|
|
|
|
|
|
.vector-feature-page-tools-enabled.vector-page-tools-pinned& {
|
|
|
|
max-width: @max-width-content-container + @width-sidebar-end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.vector-feature-page-tools-enabled .mw-body {
|
|
|
|
display: grid;
|
|
|
|
grid-auto-rows: auto;
|
|
|
|
grid-template-columns: ~'minmax(0, @{max-width-content-container}) min-content';
|
|
|
|
grid-template-areas: 'titlebar .'
|
|
|
|
'toolbar columnEnd'
|
|
|
|
'content columnEnd';
|
|
|
|
|
|
|
|
.vector-feature-limited-width-disabled&,
|
2022-11-15 19:34:12 +00:00
|
|
|
.vector-feature-limited-width-content-disabled& {
|
2022-10-20 21:52:21 +00:00
|
|
|
grid-template-columns: ~'1fr min-content';
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-page-titlebar {
|
|
|
|
grid-area: titlebar;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-page-toolbar {
|
|
|
|
grid-area: toolbar;
|
|
|
|
}
|
|
|
|
|
|
|
|
#bodyContent {
|
|
|
|
grid-area: content;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-column-end {
|
|
|
|
grid-area: columnEnd;
|
|
|
|
}
|
2022-08-15 14:42:34 +00:00
|
|
|
}
|
|
|
|
}
|