| 1 |
// |
| 2 |
// Grid layout |
| 3 |
// |
| 4 |
|
| 5 |
@media ( min-width: @min-width-breakpoint-desktop ) { |
| 6 |
.mw-page-container-inner { |
| 7 |
display: grid; |
| 8 |
column-gap: @grid-column-gap; |
| 9 |
grid-template: ~'min-content 1fr min-content / @{grid-template-column-desktop}'; |
| 10 |
// stylelint-disable-next-line @stylistic/declaration-colon-space-after |
| 11 |
grid-template-areas: |
| 12 |
'siteNotice siteNotice' |
| 13 |
'columnStart pageContent' |
| 14 |
'footer footer'; |
| 15 |
} |
| 16 |
|
| 17 |
.vector-sitenotice-container { |
| 18 |
grid-area: siteNotice; |
| 19 |
} |
| 20 |
|
| 21 |
.vector-column-start { |
| 22 |
grid-area: columnStart; |
| 23 |
overflow-anchor: none; // T330108 |
| 24 |
} |
| 25 |
|
| 26 |
.mw-content-container { |
| 27 |
grid-area: pageContent; |
| 28 |
} |
| 29 |
|
| 30 |
.mw-footer-container { |
| 31 |
grid-area: footer; |
| 32 |
} |
| 33 |
|
| 34 |
.vector-feature-page-tools-pinned-enabled .vector-column-end, |
| 35 |
.vector-feature-appearance-pinned-clientpref-1 .vector-column-end { |
| 36 |
width: @width-column-desktop; |
| 37 |
} |
| 38 |
|
| 39 |
// Align the pinnable header bottom border with the bottom-border of the |
| 40 |
// toolbar (below the page title) by pushing down the sidebar content |
| 41 |
.vector-column-start, |
| 42 |
.vector-column-end { |
| 43 |
margin-top: 2.8rem; |
| 44 |
border-top: 1px solid transparent; |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
@media ( min-width: @min-width-breakpoint-desktop-wide ) { |
| 49 |
.mw-page-container-inner { |
| 50 |
grid-template-columns: @grid-template-column-desktop-wide; |
| 51 |
} |
| 52 |
|
| 53 |
.mw-header { |
| 54 |
display: grid; |
| 55 |
column-gap: @grid-column-gap; |
| 56 |
grid-template: ~'auto / @{grid-template-column-desktop-wide}'; |
| 57 |
grid-template-areas: 'headerStart headerEnd'; |
| 58 |
|
| 59 |
.vector-header-start { |
| 60 |
grid-area: headerStart; |
| 61 |
} |
| 62 |
|
| 63 |
.vector-header-end { |
| 64 |
grid-area: headerEnd; |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
.vector-feature-page-tools-pinned-enabled .vector-column-end, |
| 69 |
.vector-feature-appearance-pinned-clientpref-1 .vector-column-end { |
| 70 |
width: @width-column-desktop-wide; |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
// Single column grid when column start is empty (i.e. no pinned ToC or pinned main menu) |
| 75 |
.vector-feature-main-menu-pinned-disabled.vector-toc-not-available .mw-page-container-inner, |
| 76 |
.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-clientpref-0 .mw-page-container-inner { |
| 77 |
grid-template-columns: @width-page-content; |
| 78 |
// stylelint-disable-next-line @stylistic/declaration-colon-space-after |
| 79 |
grid-template-areas: |
| 80 |
'siteNotice' |
| 81 |
'pageContent' |
| 82 |
'columnStart' |
| 83 |
'footer'; |
| 84 |
|
| 85 |
// Horizontally center content when single column |
| 86 |
.mw-body { |
| 87 |
justify-content: center; |
| 88 |
} |
| 89 |
} |
| 90 |
|
| 91 |
@media ( min-width: @min-width-breakpoint-desktop ) { |
| 92 |
.mw-body { |
| 93 |
display: grid; |
| 94 |
grid-template: ~'min-content min-content min-content 1fr / minmax(0, @{max-width-content-container}) min-content'; |
| 95 |
/** |
| 96 |
* NOTE: T327715 - 'titlebar-cx' grid area is a temporary workaround to accommodate |
| 97 |
* the Content Translation extension and should not be used beyond that. |
| 98 |
* FIXME: This can be removed when T322740 is resolved. |
| 99 |
*/ |
| 100 |
// stylelint-disable-next-line @stylistic/declaration-colon-space-after |
| 101 |
grid-template-areas: |
| 102 |
'titlebar-cx .' |
| 103 |
'titlebar columnEnd' |
| 104 |
'toolbar columnEnd' |
| 105 |
'content columnEnd'; |
| 106 |
|
| 107 |
.vector-page-titlebar { |
| 108 |
grid-area: titlebar; |
| 109 |
} |
| 110 |
|
| 111 |
.vector-page-toolbar { |
| 112 |
grid-area: toolbar; |
| 113 |
} |
| 114 |
|
| 115 |
#bodyContent { |
| 116 |
grid-area: content; |
| 117 |
} |
| 118 |
|
| 119 |
.vector-column-end { |
| 120 |
grid-area: columnEnd; |
| 121 |
overflow-anchor: none; |
| 122 |
} |
| 123 |
} |
| 124 |
|
| 125 |
.vector-feature-page-tools-pinned-enabled .mw-body, |
| 126 |
.vector-feature-appearance-pinned-clientpref-1 .mw-body { |
| 127 |
column-gap: @grid-column-gap; |
| 128 |
} |
| 129 |
|
| 130 |
.vector-feature-limited-width-clientpref-0 .mw-body, |
| 131 |
.vector-feature-limited-width-content-disabled .mw-body { |
| 132 |
grid-template-columns: ~'minmax(0, 1fr) min-content'; |
| 133 |
} |
| 134 |
} |