Debian Codegraph @

resources/src/mediawiki.less/mediawiki.skin.defaults.less

raw
1 // This file is the central place where we declare
2 // which variables are part of the "mediawiki.skin.variables.less"
3 // API that core and extensions can use in their style modules.
4 // This includes all of the Codex design tokens, as well as some additional variables.
5 //
6 // The initial values are intended merely as fallback to allow
7 // forward and backward compatibility to allow new variables
8 // to be defined without breaking existing implementations by
9 // skins.
10 //
11 // @since 1.36
12 // Add `@since` line above every added variable (block) per MediaWiki version.
13 //
14 // == Instructions for skins ==
15 //
16 // In skin.json, add:
17 // "SkinLessImportPaths": {
18 // "skinname": "resources/mediawiki.less"
19 // }
20 //
21 // Create a file called resources/mediawiki.less/mediawiki.skin.variables.less, which starts with:
22 // @import 'mediawiki.skin.default.less';
23 // then import the Codex theme for this skin, e.g.:
24 // @import 'mediawiki.skin.codex-design-tokens/theme-wikimedia-ui.less';
25 // followed by any overrides for these variables, e.g.:
26 // @min-width-breakpoint-desktop: 1234px;
27
28 // Make all Codex mixins available when mediawiki.skin.variables.less is imported
29 @import 'mediawiki.skin.codex/mixins/codex-public-mixins.less';
30
31 // Skin variables that are not Codex tokens:
32
33 // Form input labels for buttons, dropdowns, but also text input values.
34 // Note that there are binary inputs in skins like Vector, that receive a different treatment
35 // with name `*-input-binary`.
36 @line-height-label: 1.6;
37
38 // Colors
39 @color-link: #0645ad;
40 @color-link--visited: #0b0080;
41 @color-link--active: #faa700;
42 // Link colors for new or missing articles, also known as “Red links”.
43 // https://www.wikidata.org/wiki/Q13417974#sitelinks-wikipedia
44 @color-link-new: @color-link-red;
45 @color-link-new--visited: @color-link-red--visited;
46 @color-link-external: #36b;
47 @color-link-external--visited: #636; // See T5112.
48 @color-link-external--active: #b63;
49
50 // ----- Neutral values for Codex tokens: -----
51 // @since 1.41
52 // We don't import any of the existing Codex themes here. Instead, we provide neutral, unbranded
53 // values for every Codex token. Skins can override these individually, or they can override them
54 // en masse by importing a Codex theme. In the future, these values should be migrated into
55 // Codex as its base theme, once Codex has a proper theming system that allows for this (T296689).
56
57 @font-size-base: 1em;
58 @font-size-x-small: 0.75em;
59 @font-size-small: 0.875em;
60 @font-size-medium: 1em;
61 @font-size-large: 1.125em;
62 @font-size-x-large: 1.25em;
63 @font-size-xx-large: 1.5em;
64 @font-size-xxx-large: 1.75em;
65 @accent-color-base: #0645ad;
66 @background-color-base: #fff;
67 @background-color-base-fixed: #fff;
68 @background-color-content-added: #afb6e9;
69 @background-color-content-removed: #fc3;
70 @background-color-interactive: #eee;
71 @background-color-interactive-subtle: #f9f9f9;
72 @background-color-inverted: #000;
73 @background-color-disabled: #ccc;
74 @background-color-disabled-subtle: #eee;
75 @background-color-progressive: #0645ad;
76 @background-color-progressive--hover: #447ff5;
77 @background-color-progressive--active: #2a4b8d;
78 @background-color-progressive--focus: #0645ad;
79 @background-color-progressive-subtle: #eaf3ff;
80 @background-color-destructive: #d03;
81 @background-color-destructive--hover: #ff4242;
82 @background-color-destructive--active: #b32424;
83 @background-color-destructive--focus: #d03;
84 @background-color-destructive-subtle: #fee7e6;
85 @background-color-error: #d73333;
86 @background-color-error--hover: #ff4242;
87 @background-color-error--active: #b32424;
88 @background-color-error-subtle: #fee7e6;
89 @background-color-warning-subtle: #fef6e7;
90 @background-color-success-subtle: #d5fdf4;
91 @background-color-notice-subtle: #eee;
92 @background-color-backdrop-light: rgba( 255, 255, 255, 0.65 );
93 @background-color-backdrop-dark: rgba( 0, 0, 0, 0.65 );
94 @background-color-transparent: rgba( 255, 255, 255, 0 );
95 @background-color-neutral: #eaecf0;
96 @background-color-neutral-subtle: #f8f9fa;
97 @background-color-button-quiet--hover: rgba( 0, 24, 73, 0.027 );
98 @background-color-button-quiet--active: rgba( 0, 24, 73, 0.082 );
99 @background-color-input-binary--checked: #0645ad;
100 @background-color-tab-list-item-framed--hover: rgba( 255, 255, 255, 0.3 );
101 @background-color-tab-list-item-framed--active: rgba( 255, 255, 255, 0.65 );
102 @color-base: #222;
103 @color-base-fixed: #222;
104 @color-base--hover: #444;
105 @color-emphasized: #000;
106 @color-subtle: #555;
107 @color-placeholder: #767676;
108 @color-disabled: #767676;
109 @color-inverted: #fff;
110 @color-inverted-fixed: #fff;
111 @color-progressive: #0645ad;
112 @color-progressive--hover: #447ff5;
113 @color-progressive--active: #2a4b8d;
114 @color-progressive--focus: #0645ad;
115 @color-destructive: #d03;
116 @color-destructive--hover: #ff4242;
117 @color-destructive--active: #b32424;
118 @color-destructive--focus: #d03;
119 @color-destructive--visited: #6b4ba1;
120 @color-visited: #6b4ba1;
121 @color-error: #d03;
122 @color-warning: #edab00;
123 @color-success: #14866d;
124 @color-notice: #222;
125 @color-link-red: #d03;
126 @color-link-red--hover: #ff4242;
127 @color-link-red--active: #b32424;
128 @color-link-red--focus: #d03;
129 @color-link-red--visited: #a55858;
130 @color-content-added: #096450;
131 @color-content-removed: #b32424;
132 @opacity-base: 1;
133 @opacity-medium: 0.67;
134 @opacity-low: 0.33;
135 @opacity-transparent: 0;
136 @filter-invert-icon: 0;
137 @filter-invert-primary-button-icon: 1;
138 @opacity-icon-base: 0.87;
139 @opacity-icon-base--hover: 0.74;
140 @opacity-icon-base--selected: 1;
141 @opacity-icon-base--disabled: 0.51;
142 @opacity-icon-placeholder: 0.51;
143 @opacity-icon-subtle: 0.67;
144 @background-position-base: center;
145 @z-index-bottom: -100; // Use descriptive `z-index` tokens for layout purposes.
146 @z-index-base: 0;
147 @z-index-above-content: 1;
148 @z-index-toolbar: 2;
149 @z-index-dropdown: 50;
150 @z-index-sticky: 100;
151 @z-index-fixed: 200;
152 @z-index-off-canvas-backdrop: 300;
153 @z-index-off-canvas: 350;
154 @z-index-overlay-backdrop: 400;
155 @z-index-overlay: 450;
156 @z-index-tooltip: 800;
157 @z-index-toast-notification: 900;
158 @z-index-top: 9999;
159 @z-index-stacking-0: 0; // Use stacking-specific z-index tokens inside components to layer individual elements.
160 @z-index-stacking-1: 1;
161 @z-index-stacking-2: 2;
162 @z-index-stacking-3: 3;
163 @box-sizing-base: border-box;
164 @min-size-icon-x-small: 12px;
165 @min-size-icon-small: 16px;
166 @min-size-icon-medium: 20px;
167 @min-size-search-figure: 40px;
168 @min-height-text-area: 64px;
169 @min-height-table-header: 64px;
170 @min-height-table-footer: 64px;
171 @min-size-interactive-pointer: 32px;
172 @min-size-interactive-touch: 44px;
173 @min-size-input-binary: 20px;
174 @min-size-toggle-switch-grip: 20px;
175 @size-0: 0;
176 @size-6: 0.0625em;
177 @size-12: 0.125em;
178 @size-25: 0.25em;
179 @size-50: 0.5em;
180 @size-75: 0.75em;
181 @size-100: 1em;
182 @size-125: 1.25em;
183 @size-150: 1.5em;
184 @size-200: 2em;
185 @size-250: 2.5em;
186 @size-275: 2.75em;
187 @size-300: 3em;
188 @size-400: 4em;
189 @size-800: 8em;
190 @size-1600: 16em;
191 @size-2400: 24em;
192 @size-2800: 28em;
193 @size-3200: 32em;
194 @size-4000: 40em;
195 @size-5600: 56em;
196 @size-absolute-1: 1px;
197 @size-absolute-9999: 9999px;
198 @size-third: 33.33%;
199 @size-half: 50%;
200 @size-full: 100%;
201 @size-double: 200%;
202 @size-tooltip: max-content;
203 // stylelint-disable-next-line plugin/no-unsupported-browser-features
204 @size-viewport-width-full: 100vw;
205 // stylelint-disable-next-line plugin/no-unsupported-browser-features
206 @size-viewport-height-full: 100vh;
207 @size-icon-x-small: 0.75em;
208 @size-icon-small: 1em;
209 @size-icon-medium: 1.25em;
210 @size-search-figure: 2.5em;
211 @min-width-medium: 256px;
212 @min-width-breakpoint-mobile: 320px;
213 @min-width-breakpoint-tablet: 640px;
214 @min-width-breakpoint-desktop: 1120px;
215 @min-width-breakpoint-desktop-wide: 1680px;
216 @min-width-toggle-switch: 48px;
217 @max-width-base: none;
218 // `max-width-breakpoint-*` values are set to the next min-width breakpoint minus 1px.
219 // For cross-browser support and standards alignment Less calculations and not `calc()` is used.
220 // CSS standard doesn't specify complex values for media queries.
221 // See https://www.w3.org/TR/mediaqueries-4/#mq-features
222 // These have to be wrapped in parentheses, otherwise the Less calculation breaks (T367103)
223 @max-width-breakpoint-mobile: ( @min-width-breakpoint-tablet - 1px );
224 @max-width-breakpoint-tablet: ( @min-width-breakpoint-desktop - 1px );
225 @max-width-breakpoint-desktop: ( @min-width-breakpoint-desktop-wide - 1px );
226 @max-width-button: 28em;
227 @position-offset-border-width-base: -1px;
228 @spacing-0: 0;
229 @spacing-12: 2px;
230 @spacing-25: 4px;
231 @spacing-30: 5px;
232 @spacing-35: 6px;
233 @spacing-50: 8px;
234 @spacing-75: 12px;
235 @spacing-100: 16px;
236 @spacing-125: 20px;
237 @spacing-150: 24px;
238 @spacing-200: 32px;
239 @spacing-250: 40px;
240 @spacing-300: 48px;
241 @spacing-400: 64px;
242 @spacing-half: 50%;
243 @spacing-full: 100%;
244 @spacing-horizontal-button: 11px;
245 @spacing-horizontal-button-icon-only: 5px;
246 @spacing-horizontal-button-large: 15px;
247 @spacing-horizontal-input-text-two-end-icons: calc( @spacing-50 * 2 + @size-icon-small );
248 @spacing-start-typeahead-search-figure: 12px;
249 @spacing-start-typeahead-search-icon: 22px;
250 @spacing-typeahead-search-focus-addition: 24px;
251 @border-width-base: 1px;
252 @border-width-thick: 2px;
253 @border-width-input-radio--checked: 6px;
254 @border-style-base: solid;
255 @border-style-dashed: dashed;
256 @border-color-base: #aaa;
257 @border-color-content-added: #afb6e9;
258 @border-color-content-removed: #fc3;
259 @border-color-interactive: #767676;
260 @border-color-subtle: #ccc;
261 @border-color-muted: #eee;
262 @border-color-disabled: #ccc;
263 @border-color-inverted: #fff;
264 @border-color-progressive: #0645ad;
265 @border-color-progressive--hover: #447ff5;
266 @border-color-progressive--active: #2a4b8d;
267 @border-color-progressive--focus: #0645ad;
268 @border-color-destructive: #d03;
269 @border-color-destructive--hover: #ff4242;
270 @border-color-destructive--active: #b32424;
271 @border-color-destructive--focus: #d03;
272 @border-color-error: #d03;
273 @border-color-error--hover: #ff4242;
274 @border-color-warning: #edab00;
275 @border-color-success: #14866d;
276 @border-color-notice: #aaa;
277 @border-color-transparent: transparent;
278 @border-color-divider: #aaa;
279 @border-color-input--hover: #767676;
280 @border-color-input-binary: #767676;
281 @border-color-input-binary--hover: #447ff5;
282 @border-color-input-binary--active: #2a4b8d;
283 @border-color-input-binary--focus: #0645ad;
284 @border-color-input-binary--checked: #0645ad;
285 @border-base: @border-width-base @border-style-base @border-color-base;
286 @border-subtle: @border-width-base @border-style-base @border-color-subtle;
287 @border-progressive: @border-width-base @border-style-base @border-color-progressive;
288 @border-destructive: @border-width-base @border-style-base @border-color-destructive;
289 @border-radius-base: 0;
290 @border-radius-sharp: 0;
291 @border-radius-pill: 9999px;
292 @border-radius-circle: 50%;
293 @box-shadow-drop-small: 0 1px 1px rgba( 0, 0, 0, 0.2 );
294 @box-shadow-drop-medium: 0 2px 2px 0 rgba( 0, 0, 0, 0.2 );
295 @box-shadow-drop-xx-large: 0 20px 48px 0 rgba( 0, 0, 0, 0.2 );
296 @box-shadow-inset-small: inset 0 0 0 1px;
297 @box-shadow-inset-medium: inset 0 0 0 2px;
298 @box-shadow-inset-medium-vertical: inset 0 -2px 0 0;
299 @box-shadow-outset-small: 0 0 0 1px;
300 @box-shadow-outset-small-top: 0 -1px 0 0;
301 @box-shadow-outset-small-start: -1px 0 0 0;
302 @box-shadow-color-base: #000;
303 @box-shadow-color-progressive--active: #2a4b8d;
304 @box-shadow-color-progressive--focus: #0645ad;
305 @box-shadow-color-progressive-selected: #0645ad;
306 @box-shadow-color-progressive-selected--hover: #447ff5;
307 @box-shadow-color-progressive-selected--active: #2a4b8d;
308 @box-shadow-color-destructive--focus: #d03;
309 @box-shadow-color-inverted: #fff;
310 @box-shadow-color-transparent: transparent;
311 @outline-base--focus: 1px solid transparent;
312 @outline-color-progressive--focus: #0645ad; // Use in places where no more customized focus styles are provided, for example on generic `:focus`.
313 @font-family-base: sans-serif;
314 @font-family-system-sans: 'Arial', sans-serif;
315 @font-family-sans--fallback: sans-serif;
316 @font-family-serif: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
317 @font-family-serif--fallback: serif;
318 @font-family-monospace: 'Courier New', monospace;
319 @font-family-monospace--fallback: monospace, monospace;
320 @font-family-heading-main: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
321 @font-weight-hairline: 100;
322 @font-weight-light: 300;
323 @font-weight-normal: 400;
324 @font-weight-semi-bold: 600;
325 @font-weight-bold: 700;
326 @line-height-xxx-small: 1.25;
327 @line-height-xx-small: 1.375;
328 @line-height-small: 1.6;
329 @line-height-medium: 1.6;
330 @text-decoration-none: none;
331 @text-decoration-line-through: line-through;
332 @text-decoration-underline: underline;
333 @text-overflow-clip: clip;
334 @text-overflow-ellipsis: ellipsis;
335 @tab-size-base: 4;
336 @transition-duration-base: 100ms;
337 @transition-duration-medium: 250ms;
338 @transition-timing-function-system: ease;
339 @transition-timing-function-user: ease-out;
340 @transition-property-base: background-color, color, border-color, box-shadow;
341 @transition-property-fade: opacity;
342 @transition-property-icon: color;
343 @transition-property-icon-css-only: background-color;
344 @transition-property-toggle-switch-grip: background-color, border-color, left;
345 @animation-delay-none: 0ms;
346 @animation-delay-medium: -150ms;
347 @animation-delay-slow: -333ms;
348 @animation-duration-medium: 1500ms;
349 @animation-duration-slow: 2000ms;
350 @animation-timing-function-base: linear;
351 @animation-timing-function-bouncing: ease-in-out;
352 @animation-iteration-count-base: infinite;
353 @cursor-base: default;
354 @cursor-base--disabled: default;
355 @cursor-base--hover: pointer;
356 @cursor-grab: grab;
357 @cursor-grabbing: grabbing;
358 @cursor-help: help;
359 @cursor-move: move;
360 @cursor-not-allowed: not-allowed;
361 @cursor-resize-nesw: nesw-resize;
362 @cursor-resize-nwse: nwse-resize;
363 @cursor-text: text;
364 @cursor-zoom-in: zoom-in;
365 @cursor-zoom-out: zoom-out;
366 @unit-absolute: px;
367 @unit-relative: em;
368 // stylelint-disable-next-line function-url-quotes
369 @background-image-input-checkbox--checked: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23fff" d="M7 14.17L2.83 10l-1.41 1.41L7 17 19 5l-1.41-1.42z"/></svg>' );
370 @background-size-search-figure: cover;
371
372 // Neutral values for deprecated Codex tokens
373 @color-base--subtle: #767676; // @deprecated - do not use!
374 @font-family-sans: @font-family-sans--fallback;
375 @line-height-x-small: 1.42;