Debian Codegraph @

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

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