Debian Codegraph @

skins/Vector/resources/skins.vector.styles/layouts/screen.less

raw
1 /**
2 * Vector modern layout styles for screen
3 *
4 * Layout rules divide the page into sections and how VectorComponents should be arranged in the skin.
5 * The rules here should only define the layout, not color or typography.
6 */
7
8 html {
9 scroll-padding-top: @scroll-padding-top;
10 }
11
12 body {
13 background-color: @background-color-secondary--modern;
14 color: @color-base;
15 }
16
17 .mw-body,
18 .parsoid-body {
19 direction: ltr;
20 }
21
22 .mw-body .firstHeading {
23 word-wrap: break-word;
24 margin-bottom: 0;
25 }
26
27 .mw-header {
28 // allow z-index to apply so search results overlay article
29 position: relative;
30 z-index: @z-index-header;
31 }
32
33 #mw-content-text {
34 margin-top: 16px;
35 }
36
37 /* Content */
38 .mw-indicators {
39 z-index: @z-index-indicators;
40 }
41
42 .vector-page-titlebar {
43 .mixin-clearfix();
44 box-shadow: none;
45 // Faux bottom border that stretches to the edges
46 // of the *content*, not the full width of the box.
47 &::after {
48 content: '';
49 display: block;
50 position: absolute;
51 bottom: 0;
52 left: 0;
53 right: 0;
54 height: 1px;
55 background-color: @border-color-base;
56 }
57
58 &-blank::after {
59 content: none;
60 }
61 }
62
63 .vector-body-before-content {
64 // Contain the floating .mw-indicators, but don't use clearfix because of browser inconsistencies
65 // when combining 'clear' and 'margin-top' (T325391)
66 overflow: hidden;
67
68 // Margin is only applied to indicators inside `.vector-body-before-content` since they can
69 // also appear next to the page title, where margin is not needed.
70 .mw-indicators {
71 margin-top: @margin-top-pre-content;
72 }
73 }
74
75 // Language button at bottom of content.
76 .mw-body .mw-portlet-lang {
77 float: right;
78 }
79
80 .vector-body {
81 position: relative;
82 z-index: @z-index-base;
83 }
84
85 #siteSub {
86 margin-top: @margin-top-pre-content; // T311564
87 }
88
89 // Styles only applied to non-empty #contentSub to avoid extra margins when both #contentSub and #contentSub2
90 // are rendered.
91 #contentSub:not( :empty ),
92 #contentSub2 {
93 font-size: @font-size-small;
94 color: @color-subtle;
95 width: auto;
96 // Visually separate #contentSub and #contentSub2 (T315639)
97 margin: @margin-top-pre-content 0 0;
98 }
99
100 // Container logic.
101 .mw-page-container {
102 .mixin-vector-page-container-sizing();
103 // Setting position and z-index is important as it allows overlays appended to the body tag
104 // to position themselves over the Vector interface. This forms another stacking context for
105 // elements placed inside this element
106 position: relative;
107 z-index: @z-index-base;
108 margin: 0 auto;
109 // Use non-zero padding to disable margin collapse.
110 // Be careful not to use overflow-y: scroll here (see T270146 and T271868)
111 padding-top: 0.05px;
112 padding-left: @padding-horizontal-page-container;
113 padding-right: @padding-horizontal-page-container;
114 background-color: @background-color-page-container;
115 }
116
117 @media ( max-width: @max-width-breakpoint-mobile ) {
118 .vector-header {
119 flex-flow: column;
120 }
121
122 .vector-header-start,
123 .vector-header-end {
124 width: 100%;
125 }
126 }
127
128 @media ( min-width: @min-width-breakpoint-desktop ) {
129 .mw-page-container,
130 .vector-header-container .mw-header,
131 .vector-header-container .vector-sticky-header {
132 padding-left: @padding-horizontal-page-container-desktop;
133 padding-right: @padding-horizontal-page-container-desktop;
134 }
135 }
136
137 @media ( min-width: @min-width-breakpoint-desktop-wide ) {
138 .mw-page-container,
139 .vector-header-container .mw-header,
140 .vector-header-container .vector-sticky-header {
141 padding-left: @padding-horizontal-page-container-desktop-wide;
142 padding-right: @padding-horizontal-page-container-desktop-wide;
143 }
144 }
145
146 .vector-header-container {
147 width: 100%;
148 display: flex;
149 justify-content: center;
150 }
151
152 .vector-header-container .mw-header,
153 .vector-header-container .vector-sticky-header {
154 width: 100%;
155 // A min-height is set to account for projects where no icon is set.
156 min-height: @height-header;
157 background-color: @background-color-page-container;
158 .mixin-vector-page-container-sizing();
159 }
160
161 .vector-feature-limited-width-clientpref-0 .mw-page-container,
162 .vector-feature-limited-width-clientpref-0 .vector-sticky-header,
163 .vector-feature-limited-width-clientpref-0 .mw-header {
164 max-width: none;
165 }
166
167 .skin--responsive .mw-page-container {
168 min-width: auto;
169 }
170
171 // Address issues with INP: T358380
172 // This can be removed if Vector 2022 ever becomes responsive.
173 // More information:
174 // https://developer.chrome.com/blog/300ms-tap-delay-gone-away?hl=en
175 html {
176 touch-action: manipulation;
177 }