Debian Codegraph @

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

raw
1 /**
2 * Layout rules divide the page into sections and how VectorComponents should be arranged in the skin.
3 * The rules here should only define the layout, not color or typography.
4 * See '../../common/' folder for latter stylesheets.
5 */
6
7 @import 'mediawiki.mixins.less';
8 @import '../variables.less';
9
10 body {
11 background-color: @background-color-secondary;
12 overflow-y: scroll;
13 }
14
15 .mw-body,
16 .parsoid-body {
17 // General background/foreground color definition as one exception to the rule.
18 background-color: @background-color-base;
19 color: @color-base;
20 direction: ltr;
21 padding: 1em;
22 }
23
24 #p-personal {
25 position: absolute;
26 top: @top-personal-tools;
27 right: 0.75em;
28
29 ul {
30 padding-left: 10em; /* Keep from overlapping logo */
31 }
32 }
33
34 .mw-body,
35 #mw-data-after-content {
36 margin-left: 10em;
37 }
38
39 .mw-body {
40 // Merge the border below with tabs' one (in their background image).
41 margin-top: -@border-width-base;
42 // Border on top, left, and bottom side.
43 border: @border-width-base @border-style-base @border-color-content;
44 border-right-width: 0;
45
46 .firstHeading {
47 /* Change the default from mediawiki.skinning CSS to let indicators float into heading area (T373617) */
48 display: block;
49 }
50 }
51
52 .mw-indicators {
53 z-index: @z-index-indicators;
54 }
55
56 .vector-body {
57 position: relative;
58 z-index: @z-index-base;
59 }
60
61 /* Head */
62 #mw-page-base {
63 background-color: #fbfbfb; // This is equivalent to average( @background-color-base, @background-color-secondary );
64 background-image: linear-gradient( to bottom, @background-color-base 50%, @background-color-secondary 100% );
65 background-position: bottom left;
66 height: 5em;
67 }
68
69 #mw-head-base {
70 margin-top: -5em;
71 margin-left: 10em;
72 height: 5em;
73 }
74
75 /* Hide, but keep accessible for screen-readers */
76 #mw-navigation h2 {
77 position: absolute;
78 top: -9999px;
79 }
80
81 #mw-head {
82 position: absolute;
83 top: 0;
84 right: 0;
85 width: 100%;
86 }
87
88 /* Navigation Containers */
89 #left-navigation {
90 float: left;
91 margin-left: 10em;
92 margin-top: 2.5em;
93 /* When right nav would overlap left nav, it's placed below it
94 (normal CSS floats behavior). This rule ensures that no empty space
95 is shown between them due to right nav's margin-top. Page layout
96 is still broken, but at least the nav overlaps only the page title
97 instead of half the content. */
98 margin-bottom: -2.5em;
99 }
100
101 #right-navigation {
102 float: right;
103 margin-top: 2.5em;
104 }
105
106 /* Search */
107 .vector-search-box {
108 float: left;
109 margin-right: 0.5em;
110 margin-left: 0.5em;
111
112 // FIXME: This selector requires knowledge of the internals of the search component
113 // and should not be used here.
114 form {
115 margin: 0.5em 0 0;
116 }
117 }
118
119 // Defined as `div`.
120 // Provide extra element for gadgets due to `form` already carrying an `id`.
121 // FIXME: This selector requires knowledge of the internals of the search component
122 .vector-search-box-inner {
123 min-width: 5em;
124 width: 20vw;
125 max-width: 20em;
126 }
127
128 /* Sidebar */
129 #mw-panel {
130 position: absolute;
131 top: 0;
132 width: 10em;
133 left: 0;
134 }
135
136 // hide the heading of the first menu
137 #p-logo + .mw-portlet .vector-menu-heading {
138 display: none;
139 }
140
141 .mw-footer {
142 margin-left: 10em;
143 margin-top: 0;
144 padding: 0.75em;
145 }
146
147 /* Vector screen styles for high definition displays. These rules cross the above components and are
148 grouped together here only for the sake of the media query common to each. */
149 @media ( min-width: 982px ) {
150 .mw-body,
151 #mw-head-base,
152 #left-navigation,
153 #mw-data-after-content,
154 .mw-footer {
155 margin-left: 11em;
156 }
157
158 .mw-body {
159 padding: 1.25em 1.5em 1.5em 1.5em;
160 }
161
162 .mw-footer {
163 padding: 1.25em;
164 }
165
166 #mw-panel {
167 padding-left: 0.5em;
168 }
169
170 .vector-search-box {
171 margin-right: 1em;
172 }
173
174 #p-personal {
175 right: 1em;
176 }
177 }
178
179 // Directionality styles previously provided by the deprecated `legacy` feature (T287410)
180 // for HTML elements which do not carry dir HTML attributes.
181 // These have been copied across to legacy Vector to minimize disruption caused by T287701.
182 // If you are reading this comment in 2022, please consider checking usage in wikitext and
183 // removing them both.
184 .mw-content-ltr {
185 /* @noflip */
186 direction: ltr;
187 }
188
189 .mw-content-rtl {
190 /* @noflip */
191 direction: rtl;
192 }