1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
// Codex Design Tokens
// Codex Design Tokens v1.3.5
// Design System for Wikimedia
// See https://doc.wikimedia.org/codex/latest/design-tokens/overview.html
@font-size-base: 14px; // This token is targeted exclusively for font-size derived calculations. Apply `font-size-medium` and similar for component font size property use.
@font-size-x-small: 0.8571429em; // `x` stands for extra. In this case extra small.
@font-size-small: 1em;
@font-size-medium: 1.1428571em;
@font-size-large: 1.2857143em;
@font-size-x-large: 1.4285714em;
@font-size-xx-large: 1.7142857em;
@font-size-xxx-large: 2em;
@color-base: #202122;
@color-base--hover: #404244; // Aimed to be replaced by `color.gray600` in future.
@color-emphasized: #000;
@color-subtle: #54595d;
@color-placeholder: #72777d;
@color-disabled: #72777d;
@color-inverted: #fff;
@color-progressive: #36c; // 'Progressive' Color and states
@color-progressive--hover: #447ff5;
@color-progressive--active: #2a4b8d;
@color-progressive--focus: #36c;
@color-destructive: #d73333; // 'Destructive' Color and states
@color-destructive--hover: #ff4242;
@color-destructive--active: #b32424;
@color-destructive--focus: #d73333;
@color-visited: #6b4ba1; // 'Visited' color. In combination with progressive. Used for default links.
@color-error: #d73333;
@color-warning: #edab00; // Note, this is only meant for warning icon for contrast reasons.
@color-success: #14866d; // Note, this needs to use a tone darker than Red and Yellow for contrast reasons with background White.
@color-notice: #202122;
@color-link-red: #d73333; // Red ('new') Link color and states
@color-link-red--hover: #ff4242;
@color-link-red--active: #b32424;
@color-link-red--focus: #d73333;
@color-link-red--visited: #a55858;
@opacity-base: 1;
@opacity-medium: 0.65;
@opacity-low: 0.3;
@opacity-transparent: 0;
@filter-invert-icon: 0;
@filter-invert-primary-button-icon: 1;
@background-position-base: center;
@background-size-search-figure: cover; // Use in TypeaheadSearch and Thumbnail components for the thumb container.
@z-index-bottom: -100; // Use descriptive `z-index` tokens for layout purposes.
@z-index-base: 0;
@z-index-above-content: 1;
@z-index-toolbar: 2;
@z-index-dropdown: 50;
@z-index-sticky: 100;
@z-index-fixed: 200;
@z-index-off-canvas-backdrop: 300;
@z-index-off-canvas: 350;
@z-index-overlay-backdrop: 400;
@z-index-overlay: 450;
@z-index-tooltip: 800;
@z-index-toast-notification: 900;
@z-index-top: 9999;
@z-index-stacking-0: 0; // Use stacking-specific z-index tokens inside components to layer individual elements.
@z-index-stacking-1: 1;
@z-index-stacking-2: 2;
@z-index-stacking-3: 3;
@box-sizing-base: border-box;
@size-0: 0;
@size-6: 0.0714286em;
@size-12: 0.1428571em;
@size-25: 0.2857143em;
@size-50: 0.5714286em;
@size-75: 0.8571429em;
@size-100: 1.1428571em;
@size-125: 1.4285714em;
@size-150: 1.7142857em;
@size-200: 2.2857143em;
@size-250: 2.8571429em;
@size-275: 3.1428571em;
@size-300: 3.4285714em;
@size-400: 4.5714286em;
@size-800: 9.1428571em;
@size-1600: 18.2857143em;
@size-2400: 27.4285714em;
@size-2800: 32em;
@size-3200: 36.5714286em;
@size-5600: 64em;
@size-viewport-width-full: 100vw;
@size-viewport-height-full: 100vh;
@size-absolute-1: 1px;
@size-absolute-9999: 9999px;
@size-third: 33.33%;
@size-half: 50%;
@size-full: 100%;
@size-double: 200%;
@size-search-figure: 2.8571429em; // Alias for use in TypeaheadSearch and Thumbnail components for the same purpose and for better code readability.
@size-icon-x-small: 0.8571429em;
@size-icon-small: 1.1428571em;
@size-icon-medium: 1.4285714em;
@max-width-base: none;
@max-width-breakpoint-mobile: calc( 640px - 1px ); // A mobile device's maximum available screen width. Many older feature phones have screens smaller than this value.
@max-width-breakpoint-tablet: calc( 1120px - 1px ); // A tablet device's maximum available screen width. Note, the size chosen is eager to be re-evaluated with Web team and Product Analytics.
@max-width-breakpoint-desktop: calc( 1680px - 1px ); // A desktop device's maximum available screen width.
@max-width-button: 32em; // Note, that this is a slight amendment from WikimediaUI Base from `28.75em` = `460px` to `448px` – `dimension.2800`
@border-style-base: solid;
@border-style-dashed: dashed;
@box-shadow-drop-small: 0 1px 1px rgba( 0, 0, 0, 0.2 ); // This features color as part of the theme token value.
@box-shadow-drop-medium: 0 2px 2px 0 rgba( 0, 0, 0, 0.2 ); // This features color as part of the theme token value.
@box-shadow-drop-xx-large: 0 20px 48px 0 rgba( 0, 0, 0, 0.2 ); // This features color as part of the theme token value.
@box-shadow-inset-small: inset 0 0 0 1px;
@box-shadow-inset-medium: inset 0 0 0 2px;
@box-shadow-inset-medium-vertical: inset 0 -2px 0 0;
@box-shadow-outset-small: 0 0 0 1px;
@box-shadow-outset-small-top: 0 -1px 0 0;
@box-shadow-outset-small-start: -1px 0 0 0;
@box-shadow-color-base: #000;
@box-shadow-color-progressive--active: #2a4b8d;
@box-shadow-color-progressive--focus: #36c;
@box-shadow-color-progressive-selected: #36c;
@box-shadow-color-progressive-selected--hover: #447ff5;
@box-shadow-color-progressive-selected--active: #2a4b8d;
@box-shadow-color-destructive--focus: #d73333;
@box-shadow-color-inverted: #fff;
@box-shadow-color-transparent: transparent;
@font-family-serif: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
@font-family-monospace: 'Menlo', 'Consolas', 'Liberation Mono', 'Fira Code', 'Courier New', monospace;
@font-family-base: sans-serif; // Reference Vector's default fallback sans instead of the deprecated value `font-family-sans` in WikimediaUI Base.
@font-family-system-sans: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Inter', 'Helvetica', 'Arial', sans-serif;
@font-family-sans--fallback: sans-serif;
@font-family-serif--fallback: serif;
@font-family-monospace--fallback: monospace, monospace;
@font-family-heading-main: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif; // Legacy value from WikimediaUI Base. Use for first heading special treatment.
@font-weight-hairline: 100;
@font-weight-light: 300;
@font-weight-normal: 400;
@font-weight-semi-bold: 600;
@font-weight-bold: 700;
@line-height-xxx-small: 1.25; // `x` stands for extra. In this case extra-extra-extra small.
@line-height-xx-small: 1.375;
@line-height-small: 1.5714285;
@line-height-medium: 1.6;
@text-decoration-none: none;
@text-decoration-line-through: line-through;
@text-decoration-underline: underline;
@text-overflow-clip: clip;
@text-overflow-ellipsis: ellipsis;
@tab-size-base: 4;
@transition-duration-base: 100ms;
@transition-duration-medium: 250ms;
@transition-property-base: background-color, color, border-color, box-shadow;
@transition-property-fade: opacity;
@transition-property-icon: color;
@transition-property-icon-css-only: background-color;
@transition-property-toggle-switch-grip: background-color, border-color, transform;
@transition-timing-function-system: ease;
@transition-timing-function-user: ease-out;
@animation-delay-none: 0ms;
@animation-delay-medium: -160ms;
@animation-delay-slow: -330ms;
@animation-duration-medium: 1600ms;
@animation-duration-slow: 2000ms;
@animation-timing-function-base: linear;
@animation-timing-function-bouncing: ease-in-out;
@animation-iteration-count-base: infinite;
@cursor-base: default;
@cursor-base--disabled: default;
@cursor-base--hover: pointer;
@cursor-grab: grab;
@cursor-grabbing: grabbing;
@cursor-help: help;
@cursor-move: move;
@cursor-not-allowed: not-allowed;
@cursor-resize-nesw: nesw-resize;
@cursor-resize-nwse: nwse-resize;
@cursor-text: text;
@cursor-zoom-in: zoom-in;
@cursor-zoom-out: zoom-out;
@unit-absolute: px;
@unit-relative: em;
@accent-color-base: #36c;
@background-color-interactive: #eaecf0;
@background-color-interactive-subtle: #f8f9fa;
@background-color-disabled: #c8ccd1; // Components like Buttons, Checkboxes, Radios, ProgressBars….
@background-color-disabled-subtle: #eaecf0; // Components like TextInputs, Selects….
@background-color-progressive: #36c;
@background-color-progressive--hover: #447ff5;
@background-color-progressive--active: #2a4b8d;
@background-color-progressive--focus: #36c;
@background-color-progressive-subtle: #eaf3ff;
@background-color-destructive: #d73333;
@background-color-destructive--hover: #ff4242;
@background-color-destructive--active: #b32424;
@background-color-destructive--focus: #d73333;
@background-color-destructive-subtle: #fee7e6;
@background-color-error: #d73333;
@background-color-error--hover: #ff4242;
@background-color-error--active: #b32424;
@background-color-error-subtle: #fee7e6;
@background-color-warning-subtle: #fef6e7;
@background-color-success-subtle: #d5fdf4;
@background-color-notice-subtle: #eaecf0;
@background-color-backdrop-light: rgba( 255, 255, 255, 0.65 ); // Backdrop is the term used by CSS Fullscreen API and is used to dim the background when a modal Dialog is open. Also known as overlay mask.
@background-color-backdrop-dark: rgba( 0, 0, 0, 0.65 );
@background-color-base: #fff; // Background Colors for static elements (for page layout, sections, etc.) from here on.
@background-color-neutral: #eaecf0;
@background-color-neutral-subtle: #f8f9fa;
@background-color-transparent: transparent;
@background-color-button-quiet--hover: rgba( 0, 24, 73, 0.027 );
@background-color-button-quiet--active: rgba( 0, 24, 73, 0.082 );
@background-color-input-binary--checked: #36c;
@background-color-tab-list-item-framed--hover: rgba( 255, 255, 255, 0.3 );
@background-color-tab-list-item-framed--active: rgba( 255, 255, 255, 0.65 );
@opacity-icon-base: 0.87;
@opacity-icon-base--hover: 0.74;
@opacity-icon-base--selected: 1;
@opacity-icon-base--disabled: 0.51;
@opacity-icon-placeholder: 0.51;
@opacity-icon-subtle: 0.67;
@min-size-interactive-pointer: 32px;
@min-size-interactive-touch: 44px;
@min-size-search-figure: 40px; // Alias for use in TypeaheadSearch and Thumbnail components for the same purpose and for better code readability.
@min-size-icon-x-small: 12px;
@min-size-icon-small: 16px;
@min-size-icon-medium: 20px;
@min-size-input-binary: 20px;
@min-size-toggle-switch-grip: 20px;
@min-width-medium: 256px;
@min-width-breakpoint-mobile: 320px; // A mobile device's minimum available screen width. Many older feature phones have screens smaller than this value.
@min-width-breakpoint-tablet: 640px; // A tablet device's minimum available screen width. Note: the size chosen is eager to be re-evaluated with Web team and Product Analytics.
@min-width-breakpoint-desktop: 1120px; // A desktop device's minimum available screen width.
@min-width-breakpoint-desktop-wide: 1680px; // A wider desktop's minimum available screen width.
@min-width-toggle-switch: 48px;
@position-offset-border-width-base: -1px;
@position-offset-input-radio--focus: -0.2857143em;
@spacing-0: 0;
@spacing-12: 2px;
@spacing-25: 4px;
@spacing-30: 5px; // This token is an exception to the scale. Used as vertical `padding` in inputs and controls to achieve the default 32px component height.
@spacing-35: 6px; // This token is an exception to the scale. Used as `padding` of the ToggleSwitch component.
@spacing-50: 8px;
@spacing-75: 12px;
@spacing-100: 16px;
@spacing-125: 20px;
@spacing-150: 24px;
@spacing-200: 32px;
@spacing-250: 40px;
@spacing-300: 48px;
@spacing-400: 64px;
@spacing-half: 50%; // From here on, spacing tokens which are used for positioning values.
@spacing-full: 100%;
@spacing-horizontal-button: 12px - 1px; // Padding should equal 12px of spacing minus the width of the border
@spacing-horizontal-button-icon-only: 6px - 1px; // Padding should equal 6px of spacing minus the width of the border
@spacing-horizontal-button-large: 16px - 1px; // Padding should equal 16px of spacing minus the width of the border
@spacing-horizontal-input-text-two-end-icons: calc( 8px * 2 + 1.1428571em ); // Rely on `calc()` to make token output usable in all formats. When there are two end icons, (i.e. a clear icon and an end icon), we need to double the horizontal padding and account for the size of the extra icon. This token can be used to calculate the horizontal position of the clear icon and the padding-end of the text input.
@spacing-start-typeahead-search-figure: 12px; // The amount of space between the TypeaheadSearch figure's parent component and the TypeaheadSearch figure (input icon container, search result thumbnail, and footer icon container). We want this space to be uniform so that the figures vertically line up nicely. We use the same horizontal padding as the MenuItem.
@spacing-start-typeahead-search-icon: calc( 12px + ( 40px - 20px ) / 2 ); // The padding required for the icon to center align with the menu item thumbnail. We calculate the difference in size and add it to the expected spacing.
@spacing-typeahead-search-focus-addition: calc( ( 12px + 40px ) - ( 20px + 8px ) ); // The amount the width of the input increases when it is focused to allow for the extra spacing around the search figures. The caret position should remain static. This calculates the padding-left of the input when expanded minus the padding-left of the input when not expanded. (Note that both padding values actually include `@spacing-50` as well, but it was left out of the calculation for simplicity's sake.)
@border-width-base: 1px;
@border-width-thick: 2px;
@border-width-input-radio--checked: 6px;
@border-color-base: #a2a9b1;
@border-color-interactive: #72777d;
@border-color-disabled: #c8ccd1;
@border-color-subtle: #c8ccd1;
@border-color-muted: #eaecf0;
@border-color-inverted: #fff;
@border-color-progressive: #36c;
@border-color-progressive--hover: #447ff5;
@border-color-progressive--active: #2a4b8d;
@border-color-progressive--focus: #36c;
@border-color-destructive: #d73333;
@border-color-destructive--hover: #ff4242;
@border-color-destructive--active: #b32424;
@border-color-destructive--focus: #d73333;
@border-color-error: #b32424;
@border-color-error--hover: #ff4242;
@border-color-warning: #a66200;
@border-color-success: #096450;
@border-color-notice: #54595d;
@border-color-transparent: transparent;
@border-color-divider: #a2a9b1;
@border-color-input--hover: #72777d;
@border-color-input-binary: #72777d;
@border-color-input-binary--hover: #447ff5;
@border-color-input-binary--active: #2a4b8d;
@border-color-input-binary--focus: #36c;
@border-color-input-binary--checked: #36c;
@border-base: 1px solid #a2a9b1;
@border-subtle: 1px solid #c8ccd1;
@border-progressive: 1px solid #36c;
@border-destructive: 1px solid #d73333;
@border-radius-base: 2px;
@border-radius-sharp: 0;
@border-radius-pill: 9999px;
@border-radius-circle: 50%; // Use `50%` for circle or ellipsis. See https://stackoverflow.com/a/29966500
@outline-base--focus: 1px solid transparent; // Enable Windows high contrast mode on certain widgets, that have default outlines overridden.
@outline-color-progressive--focus: #36c; // Use in places where no more customized focus styles are provided, for example on generic `:focus`.
@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>' );
@min-height-text-area: 64px;
@min-height-table-header: 64px;
@min-height-table-footer: 64px;
// DEPRECATED TOKENS
// Warning: the following token name is deprecated (Use `color-subtle` instead. Note, that `color-subtle` is using `color.gray600` instead of `color.gray500` now.)
@color-base--subtle: #72777d;
// Warning: the following token name is deprecated (Use `font-family-sans--fallback` instead. See T247166.)
@font-family-sans: 'Helvetica Neue', 'Helvetica', 'Liberation Sans', 'Arial', sans-serif;
// Warning: the following token name is deprecated (Legacy line-height. Use `line-height-small` instead.)
@line-height-x-small: 1.4285714;
// Warning: the following token name is deprecated (No replacement for this token. Only used in non-Codex products and design decision is to need to rely on background for this state.)
@background-color-primary--hover: rgba( 51, 102, 204, 0.1 );
// Warning: the following token name is deprecated, use min-width-breakpoint-mobile instead. (Legacy breakpoint. Use `min-width`/`max-width` breakpoint token instead. A mobile device's screen width. Many older feature phones have screens smaller than this value.)
@width-breakpoint-mobile: 320px;
// Warning: the following token name is deprecated (Legacy breakpoint. Use `min-width`/`max-width` breakpoint token instead. A tablet device's screen width.)
@width-breakpoint-tablet: 720px;
// Warning: the following token name is deprecated (Legacy breakpoint. Use `min-width`/`max-width` breakpoint token instead. A desktop device's screen width.)
@width-breakpoint-desktop: 1000px;
// Warning: the following token name is deprecated (Legacy breakpoint. Use `min-width`/`max-width` breakpoint token instead. A wider desktop's screen width.)
@width-breakpoint-desktop-wide: 1200px;
// Warning: the following token name is deprecated (Legacy breakpoint. Use `min-width`/`max-width` breakpoint token instead. An extra wide desktop's screen width.)
@width-breakpoint-desktop-extrawide: 2000px;
|