Debian Codegraph @

skins/Vector/resources/skins.vector.styles/variables.less

raw
1 @import 'mediawiki.skin.variables.less';
2
3 // Defines the minimum viewport width, at which point the layout will not get any
4 // smaller and will start horizontal scrolling instead.
5 @min-width-supported: unit( 300px / @font-size-browser, em );
6
7 // Sizing calculation primitives.
8 @font-size-root: 100%;
9 @font-size-browser: 16; // Assumed browser default of `16px`
10
11 //
12 // == Page content ==
13 //
14
15 @color-link-selected: @color-base;
16
17 //
18 // == Typography ==
19 //
20 // Font family stack is defined in Codex “WikimediaUI“ theme, available
21 // through 'mediawiki.less/mediawiki.skin.variables.less' in MediaWiki core:
22 // https://gerrit.wikimedia.org/r/plugins/gitiles/design/codex/+/refs/heads/main/packages/codex-design-tokens/src/theme-wikimedia-ui.json#429
23 // See also Vector's 'mediawiki.skin.variables.less' overrides.
24
25 @font-size-reset: @font-size-root;
26 @font-size-heading-1: 1.8em;
27 @font-size-heading-2: 1.5em;
28 @font-size-heading-3: 1.2em;
29 @font-size-notification: 0.8em;
30 @font-size-site-notice: 0.8em;
31 @font-size-footer: unit( 12 / @font-size-browser, em );
32
33 @line-height-base: 1.6;
34 @line-height-code: 1.3;
35 @line-height-footer-info: 1.4;
36 @line-height-footer-buttons: 2;
37
38 @size-icon: unit( 20 / @font-size-browser, em );
39
40 // Due to darker background gradient, border needs to be darkened for aligned visual perception.
41 @border-start-blockquote: 4px @border-style-base @border-color-muted;
42 @padding-blockquote: 8px 32px;
43
44 @background-color-secondary--modern: @background-color-neutral-subtle;
45 @background-color-page-container: @background-color-base;
46
47 // Navigation
48 // Navigation `line-height` has to be set in `em`s due to a rendering calculation issue.
49 @line-height-nav: 1.125em;
50
51 // Navigation: Personal tools
52 @background-position-nav-personal-icon: left unit( 4 / @font-size-browser / @font-size-nav-personal, em );
53 @background-size-nav-personal-icon: unit( 14 / @font-size-browser / @font-size-nav-personal, em );
54 @top-personal-tools: 6px;
55 @font-size-nav-personal: 0.75em;
56 // Using `unit()` without second parameter to achieve a unitless output for `line-height`.
57 @line-height-nav-personal: unit( 14 / @font-size-browser / @font-size-nav-personal ); // Equals `1.667`.
58
59 // Tabs
60 @padding-horizontal-tabs: 8px;
61 @padding-top-tabs: 12px;
62 @padding-vertical-tabs: @padding-top-tabs 0 7px 0;
63
64 // Content boxes
65 @border-radius-content-box: 4px;
66 @border-color-content-box: @background-color-interactive;
67 // Content padding
68 @padding-vertical-content-box: @spacing-150;
69 @padding-horizontal-content-box: @spacing-150;
70 // content box changes *horizontal* padding at wide resolutions
71 @padding-horizontal-content-box-wide: @spacing-300;
72 // Content box shadow
73 @box-shadow-content-box: @box-shadow-drop-medium;
74
75 // Dropdowns & menus
76 @height-dropdown-menu-item: unit( 32 / @font-size-browser, rem );
77 @padding-horizontal-dropdown-menu: 16px;
78 @padding-vertical-dropdown-menu: 16px;
79 @padding-vertical-dropdown-menu-item: 6px;
80 @font-size-dropdown: @font-size-small;
81
82 // TOC
83 @size-toc-subsection-toggle: 22px;
84 @size-toc-subsection-toggle-icon: 0.7rem;
85 @toc-list-item-padding-start: 12px;
86
87 // Search
88 @max-width-search: unit( 500px / @font-size-browser / @font-size-small, em ); // 35.71428571em @ 16 & 0.875em T270202
89 @min-width-search-button: 28px;
90 @width-search-button: unit( 28 / @font-size-browser / @font-size-search-input, em );
91 @font-size-search-input: unit( 13 / @font-size-browser, em ); // Equals `0.8125em`.
92 // Derived from @size-typeahead-search-focus-addition in Codex
93 // https://gerrit.wikimedia.org/r/plugins/gitiles/design/codex/+/refs/tags/v0.1.0-alpha.8/packages/codex/src/components/typeahead-search/TypeaheadSearch.vue#703
94 @size-search-expand: 24px;
95 @margin-end-search: 12px;
96
97 // Pre-content
98 @margin-top-pre-content: 8px;
99
100 // Header
101 // T245190 T296321 For sticky header, set an explicit height. This is needed for scroll padding
102 // and for other sticky elements on the page. Setting the height in relative units enables
103 // the header's height to adapt to the browser's font size setting. Because
104 // this variable is used to determine top offsets for sticky elements where the
105 // font-size might not be 16px, using rem avoids the cascading effects of em units.
106 @height-header: unit( 50px / @font-size-browser, rem );
107
108 // Z-indices
109 // See Codex tokens https://doc.wikimedia.org/codex/latest/design-tokens/z-index.html
110 @z-index-header: @z-index-stacking-3;
111 @z-index-search-button: @z-index-stacking-1;
112 // Ensure that this is displayed on top of .vector-body and clickable.
113 @z-index-indicators: @z-index-stacking-1;
114 // Menus must overlap indicators (@z-index-indicators) and VisualEditor toolbar (z-index: 2).
115 // @z-index-dropdown: 50; in Codex
116 // @z-index-overlay is 450 in new Codex tokens; was 101;
117
118 // See skinStyles/jquery.ui/jquery.ui.slider.css.
119 // @z-index-ui-slider-range: 1;
120 // See skinStyles/jquery.ui/jquery.ui.datepicker.css.
121 // @z-index-ui-datepicker-cover: -1;
122 // See skinStyles/jquery.ui/jquery.ui.slider.css.
123 // @z-index-ui-slider-handle: 2;
124 // See skinStyles/jquery.ui/jquery.ui.selectable.css.
125 // @z-index-ui-selectable-helper: 100;
126 // See skinStyles/jquery.ui/jquery.ui.tooltip.css.
127 // @z-index-ui-tooltip: 9999;
128
129 // Transitions
130 // Sticky header hide/show transition
131 @transition-sticky-header: transform 250ms linear;
132
133 //
134 // Layout
135 //
136 @max-width-page-container: unit( 1596px / @font-size-browser, rem ); // T305069 - 99.75rem @ 16
137 @max-width-content-container: unit( 948px / @font-size-browser, rem ); // T335155
138 @padding-horizontal-page-container: unit( 24px / @font-size-browser, rem );
139 @padding-horizontal-page-container-desktop: unit( 44px / @font-size-browser, rem );
140 @padding-horizontal-page-container-desktop-wide: unit( 52px / @font-size-browser, rem );
141 // T314419 - Scroll padding is modified primarily to bring section headings into a position that is
142 // easier to read, which is slightly lower than the very top of the page. The primary use-case is when
143 // navigating sections via the table of contents. When changing this value, also change the value in
144 // resources/skins.vector.scripts/setupIntersectionObservers.js
145 @scroll-padding-top: 75px;
146
147 // Grid
148 @grid-row-gap: 24px;
149 @grid-column-gap: 24px;
150 /* Use of minmax is important to restrict the maximum grid column width more information: T314756 */
151 @width-page-content: minmax(0, 1fr);
152 @width-column-desktop: unit( 196px / @font-size-browser, rem ); // Total width including gap is 232px
153 @width-column-desktop-wide: unit( 248px / @font-size-browser, rem ); // Total width including gap is 284px
154 @grid-template-column-desktop: ~'@{width-column-desktop} @{width-page-content}';
155 @grid-template-column-desktop-wide: ~'@{width-column-desktop-wide} @{width-page-content}';