@transferwise/neptune-css 0.0.0-experimental-1181467
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +13 -0
- package/README.md +45 -0
- package/dist/css/accordion.css +1 -0
- package/dist/css/alerts.css +1 -0
- package/dist/css/background.css +1 -0
- package/dist/css/badge.css +1 -0
- package/dist/css/border-radius.css +1 -0
- package/dist/css/breadcrumbs.css +1 -0
- package/dist/css/button-groups.css +1 -0
- package/dist/css/buttons.css +1 -0
- package/dist/css/chevron.css +1 -0
- package/dist/css/circles.css +1 -0
- package/dist/css/close.css +1 -0
- package/dist/css/column-layout.css +1 -0
- package/dist/css/currency-flags.css +1 -0
- package/dist/css/decision.css +1 -0
- package/dist/css/dropdowns.css +1 -0
- package/dist/css/droppable.css +1 -0
- package/dist/css/flex.css +1 -0
- package/dist/css/footer.css +1 -0
- package/dist/css/grid.css +1 -0
- package/dist/css/input-groups.css +1 -0
- package/dist/css/link-callout.css +1 -0
- package/dist/css/list-group.css +1 -0
- package/dist/css/loaders.css +1 -0
- package/dist/css/media.css +1 -0
- package/dist/css/modals.css +1 -0
- package/dist/css/navbar-base.css +1 -0
- package/dist/css/navbar.css +1 -0
- package/dist/css/navs.css +1 -0
- package/dist/css/neptune-addons.css +1 -0
- package/dist/css/neptune-core.css +1 -0
- package/dist/css/neptune-social-media.css +1 -0
- package/dist/css/neptune.css +1 -0
- package/dist/css/panels.css +1 -0
- package/dist/css/popovers.css +1 -0
- package/dist/css/process.css +1 -0
- package/dist/css/progress-bars.css +1 -0
- package/dist/css/ring.css +1 -0
- package/dist/css/select.css +1 -0
- package/dist/css/sequences.css +1 -0
- package/dist/css/table.css +1 -0
- package/dist/css/tick.css +1 -0
- package/dist/css/tooltip.css +1 -0
- package/dist/css/utilities.css +1 -0
- package/dist/css/wells.css +1 -0
- package/dist/fonts/TW-Averta-Bold.woff +0 -0
- package/dist/fonts/TW-Averta-Bold.woff2 +0 -0
- package/dist/fonts/TW-Averta-Regular.woff +0 -0
- package/dist/fonts/TW-Averta-Regular.woff2 +0 -0
- package/dist/fonts/TW-Averta-Semibold.woff +0 -0
- package/dist/fonts/TW-Averta-Semibold.woff2 +0 -0
- package/dist/fonts/TransferWise-IconFont.svg +81 -0
- package/dist/fonts/TransferWise-IconFont.woff +0 -0
- package/dist/fonts/WorldwiseSans-Heavy.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/dist/img/bg-dark.svg +31 -0
- package/dist/img/bg-light.svg +26 -0
- package/dist/less/legacy-variables.less +1299 -0
- package/dist/less/neptune-tokens.less +272 -0
- package/dist/less/zindex.less +17 -0
- package/dist/props/custom-media.css +9 -0
- package/dist/props/legacy-custom-props.css +69 -0
- package/dist/props/neptune-tokens.css +150 -0
- package/package.json +59 -0
- package/scripts/neptune-css-upgrader.js +106 -0
- package/src/fonts/TW-Averta-Bold.woff +0 -0
- package/src/fonts/TW-Averta-Bold.woff2 +0 -0
- package/src/fonts/TW-Averta-Regular.woff +0 -0
- package/src/fonts/TW-Averta-Regular.woff2 +0 -0
- package/src/fonts/TW-Averta-Semibold.woff +0 -0
- package/src/fonts/TW-Averta-Semibold.woff2 +0 -0
- package/src/fonts/TransferWise-IconFont.svg +81 -0
- package/src/fonts/TransferWise-IconFont.woff +0 -0
- package/src/fonts/WorldwiseSans-Heavy.woff2 +0 -0
- package/src/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/src/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/src/img/bg-dark.svg +31 -0
- package/src/img/bg-light.svg +26 -0
- package/src/less/accordion.less +15 -0
- package/src/less/addons/_background-utilities.less +82 -0
- package/src/less/addons/_border.less +3 -0
- package/src/less/addons/_display-utilities.less +159 -0
- package/src/less/addons/_spacing-utilities.less +49 -0
- package/src/less/addons/_utilities.less +147 -0
- package/src/less/alerts.less +253 -0
- package/src/less/background.less +24 -0
- package/src/less/badge.less +85 -0
- package/src/less/border-radius.less +3 -0
- package/src/less/breadcrumbs.less +27 -0
- package/src/less/button-groups.less +424 -0
- package/src/less/buttons.less +714 -0
- package/src/less/chevron.less +39 -0
- package/src/less/circles.less +223 -0
- package/src/less/close.less +48 -0
- package/src/less/column-layout.less +167 -0
- package/src/less/components/_component-animations.less +43 -0
- package/src/less/core/_fonts.less +97 -0
- package/src/less/core/_scaffolding.less +473 -0
- package/src/less/core/_typography-utilities.less +269 -0
- package/src/less/core/_typography.less +794 -0
- package/src/less/currency-flags.less +41 -0
- package/src/less/decision.less +98 -0
- package/src/less/dropdowns.less +374 -0
- package/src/less/droppable.less +280 -0
- package/src/less/flex.less +113 -0
- package/src/less/footer.less +113 -0
- package/src/less/forms/bootstrap-forms.less +1227 -0
- package/src/less/forms/checkbox-radio.less +303 -0
- package/src/less/grid.less +187 -0
- package/src/less/input-groups.less +299 -0
- package/src/less/link-callout.less +17 -0
- package/src/less/list-group.less +260 -0
- package/src/less/loaders.less +91 -0
- package/src/less/media.less +61 -0
- package/src/less/mixins/_alerts.less +35 -0
- package/src/less/mixins/_arrows.less +52 -0
- package/src/less/mixins/_border-radius.less +11 -0
- package/src/less/mixins/_buttons.less +82 -0
- package/src/less/mixins/_center-block.less +7 -0
- package/src/less/mixins/_circle.less +11 -0
- package/src/less/mixins/_clearfix.less +23 -0
- package/src/less/mixins/_flex.less +105 -0
- package/src/less/mixins/_forms.less +128 -0
- package/src/less/mixins/_grid-framework.less +104 -0
- package/src/less/mixins/_grid.less +158 -0
- package/src/less/mixins/_hide-text.less +20 -0
- package/src/less/mixins/_links.less +7 -0
- package/src/less/mixins/_list-group.less +23 -0
- package/src/less/mixins/_logical-properties-IE-friendly.less +381 -0
- package/src/less/mixins/_logical-properties-modern-browsers.less +226 -0
- package/src/less/mixins/_logical-properties.less +5 -0
- package/src/less/mixins/_nav-vertical-align.less +10 -0
- package/src/less/mixins/_panels.less +23 -0
- package/src/less/mixins/_physical-properties.less +110 -0
- package/src/less/mixins/_reset-text.less +22 -0
- package/src/less/mixins/_sequence.less +203 -0
- package/src/less/mixins/_spacing.less +122 -0
- package/src/less/mixins/_tab-focus.less +5 -0
- package/src/less/mixins/_table-row.less +47 -0
- package/src/less/mixins/_text-emphasis.less +39 -0
- package/src/less/mixins/_theming.less +7 -0
- package/src/less/modals.less +239 -0
- package/src/less/navbar-base.less +1333 -0
- package/src/less/navbar.less +106 -0
- package/src/less/navs.less +341 -0
- package/src/less/neptune-addons.less +4 -0
- package/src/less/neptune-core.less +4 -0
- package/src/less/neptune-social-media.less +57 -0
- package/src/less/neptune.bundle.less +44 -0
- package/src/less/panels.less +410 -0
- package/src/less/popovers.less +381 -0
- package/src/less/process.less +395 -0
- package/src/less/progress-bars.less +70 -0
- package/src/less/ring.less +51 -0
- package/src/less/select.less +88 -0
- package/src/less/sequences.less +515 -0
- package/src/less/table.less +385 -0
- package/src/less/tick.less +37 -0
- package/src/less/tooltip.less +132 -0
- package/src/less/utilities.less +153 -0
- package/src/less/wells.less +37 -0
- package/src/props/custom-media.css +9 -0
- package/src/props/legacy-custom-props.css +69 -0
- package/src/props/neptune-tokens.css +11 -0
- package/src/variables/legacy-variables.less +1299 -0
- package/src/variables/neptune-tokens.less +12 -0
- package/src/variables/zindex.less +17 -0
- package/upgrades/scripts/2021-11-v11-v12.js +61 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
|
|
2
|
+
// Mixin to support Logical properties/values for modern browsers
|
|
3
|
+
|
|
4
|
+
// Custom property for the cases which doesn't exist a logical value. (Translations, linear-gradients)
|
|
5
|
+
:root {
|
|
6
|
+
--left: left;
|
|
7
|
+
--right: right;
|
|
8
|
+
|
|
9
|
+
&[dir="rtl"] {
|
|
10
|
+
--left: right;
|
|
11
|
+
--right: left;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// CSS property: float: Flow-relative values inline-start and inline-end: https://caniuse.com/mdn-css_properties_float_flow_relative_values
|
|
16
|
+
// Still needs support in Chrome / Safari / Edge
|
|
17
|
+
|
|
18
|
+
.float(@direction) {
|
|
19
|
+
& when (@direction = left) {
|
|
20
|
+
[dir="rtl"] & {
|
|
21
|
+
float: right;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
float: @direction;
|
|
25
|
+
float: inline-start;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& when (@direction = right) {
|
|
29
|
+
[dir="rtl"] & {
|
|
30
|
+
float: left;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
float: @direction;
|
|
34
|
+
float: inline-end;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// CSS property: clear: Flow-relative values inline-start and inline-end: https://caniuse.com/mdn-css_properties_clear_flow_relative_values
|
|
39
|
+
|
|
40
|
+
.clear(@direction) {
|
|
41
|
+
& when (@direction = left) {
|
|
42
|
+
[dir="rtl"] & {
|
|
43
|
+
clear: right;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
clear: @direction;
|
|
47
|
+
clear: inline-start;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& when (@direction = right) {
|
|
51
|
+
[dir="rtl"] & {
|
|
52
|
+
clear: left;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
clear: @direction;
|
|
56
|
+
clear: inline-end;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// CSS property: text-align: Flow-relative values start and end: https://caniuse.com/mdn-css_properties_text-align_flow_relative_values_start_and_end
|
|
61
|
+
|
|
62
|
+
.text-align(@direction) {
|
|
63
|
+
& when (@direction = left) {
|
|
64
|
+
text-align: start;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
& when (@direction = right) {
|
|
68
|
+
text-align: end;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// CSS Logical Properties: https://caniuse.com/css-logical-props
|
|
73
|
+
|
|
74
|
+
.padding(@direction, @value) {
|
|
75
|
+
& when (@direction = left) {
|
|
76
|
+
padding-inline-start: @value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& when (@direction = right) {
|
|
80
|
+
padding-inline-end: @value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Use only if the right and left values are different or you have to step up specificity of the padding.
|
|
85
|
+
// Use for single value shorthand 'padding: var(--foo);' -> '.padding-shorthand(var(--foo))'
|
|
86
|
+
// Use for multiple value shorthand 'padding: var(--foo1) var(--foo2) var(--foo3) var(--foo4);' -> '.padding-shorthand(var(--foo1), var(--foo2), var(--foo3), var(--foo4))'
|
|
87
|
+
|
|
88
|
+
.padding-shorthand(@value1, @value2: ~'', @value3: ~'', @value4: ~'') {
|
|
89
|
+
[dir="rtl"] & {
|
|
90
|
+
padding: @value1 @value4 @value3 @value2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
html:not([dir="rtl"]) & {
|
|
94
|
+
padding: @value1 @value2 @value3 @value4;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// CSS Logical Properties: https://caniuse.com/css-logical-props
|
|
99
|
+
|
|
100
|
+
.margin(@direction, @value) {
|
|
101
|
+
& when (@direction = left) {
|
|
102
|
+
margin-inline-start: @value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& when (@direction = right) {
|
|
106
|
+
padding-inline-end: @value;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Use only if the right and left values are different or you have to step up specificity of the margin.
|
|
111
|
+
// Use for single value shorthand 'margin: var(--foo);' -> '.margin-shorthand(var(--foo))'
|
|
112
|
+
// Use for multiple value shorthand 'margin: var(--foo1) var(--foo2) var(--foo3) var(--foo4);' -> '.margin-shorthand(var(--foo1), var(--foo2), var(--foo3), var(--foo4))'
|
|
113
|
+
|
|
114
|
+
.margin-shorthand(@value1, @value2: ~'', @value3: ~'', @value4: ~'') {
|
|
115
|
+
[dir="rtl"] & {
|
|
116
|
+
margin: @value1 @value4 @value3 @value2;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
html:not([dir="rtl"]) & {
|
|
120
|
+
margin: @value1 @value2 @value3 @value4;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// CSS property: inset-inline (positions): https://caniuse.com/mdn-css_properties_inset-inline
|
|
125
|
+
|
|
126
|
+
.left(@value) {
|
|
127
|
+
inset-inline-start: @value;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.right(@value) {
|
|
131
|
+
inset-inline-end: @value;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// CSS property: border-inline-start https://caniuse.com/mdn-css_properties_border-inline-start
|
|
135
|
+
|
|
136
|
+
.border(@direction, @size, @style: ~'', @color: ~'') {
|
|
137
|
+
& when (@direction = left) {
|
|
138
|
+
border-inline-start: @size @style @color;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
& when (@direction = right) {
|
|
142
|
+
border-inline-end: @size @style @color;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.border-width(@direction, @size) {
|
|
147
|
+
& when (@direction = left) {
|
|
148
|
+
border-inline-start-width: @size;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
& when (@direction = right) {
|
|
152
|
+
border-inline-end-width: @size;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// CSS property: border-start-start-radius: https://caniuse.com/mdn-css_properties_border-start-start-radius
|
|
157
|
+
// Still needs support in Safari
|
|
158
|
+
|
|
159
|
+
// | start-start | start-end |
|
|
160
|
+
// | end-start | end-end |
|
|
161
|
+
|
|
162
|
+
.border-radius(@direction, @radius) {
|
|
163
|
+
& when (@direction = left) {
|
|
164
|
+
border-start-start-radius: @radius;
|
|
165
|
+
border-end-start-radius: @radius;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
& when (@direction = right) {
|
|
169
|
+
border-start-end-radius: @radius;
|
|
170
|
+
border-end-end-radius: @radius;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.border-top-dir-radius(@direction, @radius) {
|
|
175
|
+
& when (@direction = left) {
|
|
176
|
+
border-start-start-radius: @radius;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
& when (@direction = right) {
|
|
180
|
+
border-start-end-radius: @radius;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.border-bottom-dir-radius(@direction, @radius) {
|
|
185
|
+
& when (@direction = left) {
|
|
186
|
+
border-end-start-radius: @radius;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
& when (@direction = right) {
|
|
190
|
+
border-end-end-radius: @radius;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Background position
|
|
195
|
+
|
|
196
|
+
.background-position(@direction, @vertical-direction: ~'') {
|
|
197
|
+
& when (@direction = left) {
|
|
198
|
+
background-position: var(--left) @vertical-direction;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
& when (@direction = right) {
|
|
202
|
+
background-position: var(--right) @vertical-direction;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Horizontal linear gradient
|
|
207
|
+
|
|
208
|
+
.background-linear-gradient(@direction, @color1, @color2) {
|
|
209
|
+
& when (@direction = left) {
|
|
210
|
+
background: linear-gradient(to var(--left), @color1, @color2);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
& when (@direction = right) {
|
|
214
|
+
background: linear-gradient(to var(--right), @color1, @color2);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Horizontal translations
|
|
219
|
+
|
|
220
|
+
.translateX(@value, @transform2: ~'', @transform3: ~'') {
|
|
221
|
+
[dir="rtl"] & {
|
|
222
|
+
transform: translateX(@value * -1) @transform2 @transform3;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
transform: translateX(@value) @transform2 @transform3;
|
|
226
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Navbar vertical align
|
|
2
|
+
//
|
|
3
|
+
// Vertically center elements in the navbar.
|
|
4
|
+
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);`
|
|
5
|
+
// to calculate the appropriate top margin.
|
|
6
|
+
|
|
7
|
+
.navbar-vertical-align(@element-height) {
|
|
8
|
+
margin-top: (((@navbar-height - @element-height) / 2) + 1px);
|
|
9
|
+
margin-bottom: (((@navbar-height - @element-height) / 2) - 1px);
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
|
|
2
|
+
border-color: @border !important;
|
|
3
|
+
|
|
4
|
+
& > .panel-heading {
|
|
5
|
+
color: @heading-text-color;
|
|
6
|
+
border-color: @heading-border;
|
|
7
|
+
|
|
8
|
+
+ .panel-collapse > .panel-body {
|
|
9
|
+
border-top-color: @border;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.badge {
|
|
13
|
+
color: @heading-bg-color;
|
|
14
|
+
background-color: @heading-text-color;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& > .panel-footer {
|
|
19
|
+
+ .panel-collapse > .panel-body {
|
|
20
|
+
border-bottom-color: @border;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Mixin to add physical properties/values without RTL support for a lighter bundle.
|
|
2
|
+
|
|
3
|
+
// Float left/right
|
|
4
|
+
|
|
5
|
+
.float(@direction) {
|
|
6
|
+
& when (@direction = left) {
|
|
7
|
+
float: @direction;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
& when (@direction = right) {
|
|
11
|
+
float: @direction;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Clear left/right
|
|
16
|
+
|
|
17
|
+
.clear(@direction) {
|
|
18
|
+
& when (@direction = left) {
|
|
19
|
+
clear: @direction;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& when (@direction = right) {
|
|
23
|
+
clear: @direction;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// text-align: left/right
|
|
28
|
+
|
|
29
|
+
.text-align(@direction) {
|
|
30
|
+
& when (@direction = left) {
|
|
31
|
+
text-align: left;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& when (@direction = right) {
|
|
35
|
+
text-align: right;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// padding-left / padding-right
|
|
40
|
+
|
|
41
|
+
.padding(@direction, @value) {
|
|
42
|
+
& when (@direction = left) {
|
|
43
|
+
padding-left: @value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& when (@direction = right) {
|
|
47
|
+
padding-right: @value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// margin-left / margin-right
|
|
52
|
+
|
|
53
|
+
.margin(@direction, @value) {
|
|
54
|
+
& when (@direction = left) {
|
|
55
|
+
margin-left: @value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
& when (@direction = right) {
|
|
59
|
+
padding-left: @value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// left / right (positions)
|
|
64
|
+
|
|
65
|
+
.left(@value) {
|
|
66
|
+
left: @value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.right(@value) {
|
|
70
|
+
right: @value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// border-left / border-right
|
|
74
|
+
|
|
75
|
+
.border(@direction, @size, @style: ~'', @color: ~'') {
|
|
76
|
+
& when (@direction = left) {
|
|
77
|
+
border-left: @size @style @color;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
& when (@direction = right) {
|
|
81
|
+
border-right: @size @style @color;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.border-width(@direction, @size) {
|
|
86
|
+
& when (@direction = left) {
|
|
87
|
+
border-left-width: @size;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& when (@direction = right) {
|
|
91
|
+
border-right-width: @size;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Border radius
|
|
96
|
+
|
|
97
|
+
// | top-left | top-right |
|
|
98
|
+
// | bottom-left | bottom-right |
|
|
99
|
+
|
|
100
|
+
.border-radius(@direction, @radius) {
|
|
101
|
+
& when (@direction = left) {
|
|
102
|
+
border-top-left-radius: @radius;
|
|
103
|
+
border-bottom-left-radius: @radius;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
& when (@direction = right) {
|
|
107
|
+
border-top-right-radius: @radius;
|
|
108
|
+
border-bottom-right-radius: @radius;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import (reference) "_logical-properties.less";
|
|
2
|
+
|
|
3
|
+
.reset-text() {
|
|
4
|
+
font-family: var(--font-family-regular);
|
|
5
|
+
|
|
6
|
+
// We deliberately do NOT reset font-size.
|
|
7
|
+
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: normal;
|
|
10
|
+
letter-spacing: normal;
|
|
11
|
+
line-break: auto;
|
|
12
|
+
line-height: var(--size-24);
|
|
13
|
+
.text-align(left);
|
|
14
|
+
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
text-shadow: none;
|
|
17
|
+
text-transform: none;
|
|
18
|
+
white-space: normal;
|
|
19
|
+
word-break: normal;
|
|
20
|
+
word-spacing: normal;
|
|
21
|
+
word-wrap: normal;
|
|
22
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
@import (reference) "_logical-properties.less";
|
|
2
|
+
|
|
3
|
+
.sequence-vertical-spacing(
|
|
4
|
+
@sequence-margin,
|
|
5
|
+
@sequence-item-spacing-mobile,
|
|
6
|
+
@sequence-item-spacing-desktop,
|
|
7
|
+
@pip-offset-mobile,
|
|
8
|
+
@pip-offset-desktop,
|
|
9
|
+
@sequence-step-height,
|
|
10
|
+
@sequence-icon-size
|
|
11
|
+
) {
|
|
12
|
+
@sequence-outside-spacing: (@sequence-margin + @sequence-item-spacing-desktop);
|
|
13
|
+
|
|
14
|
+
> li {
|
|
15
|
+
padding-top: @sequence-item-spacing-mobile;
|
|
16
|
+
padding-bottom: @sequence-item-spacing-mobile;
|
|
17
|
+
|
|
18
|
+
&:first-child {
|
|
19
|
+
margin-top: @sequence-margin;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:last-child {
|
|
23
|
+
margin-bottom: @sequence-margin;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (min-width: @screen-md-min) {
|
|
27
|
+
padding-top: @sequence-item-spacing-desktop;
|
|
28
|
+
padding-bottom: @sequence-item-spacing-desktop;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::before {
|
|
32
|
+
margin-top: ((@sequence-step-height / 2) - (@sequence-pip-size / 2));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&::after {
|
|
36
|
+
top: @pip-offset-desktop;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:first-child::after {
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:last-child::after {
|
|
44
|
+
height: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.sequence-top {
|
|
49
|
+
> li:first-child {
|
|
50
|
+
padding-top: @sequence-outside-spacing;
|
|
51
|
+
margin-top: 0;
|
|
52
|
+
|
|
53
|
+
&::after {
|
|
54
|
+
height: ~"calc(100% + @{pip-offset-desktop})";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.sequence-bottom {
|
|
60
|
+
> li:last-child {
|
|
61
|
+
padding-bottom: @sequence-outside-spacing;
|
|
62
|
+
margin-bottom: 0;
|
|
63
|
+
|
|
64
|
+
&::after {
|
|
65
|
+
height: ~"calc(100% - @{pip-offset-desktop})";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.sequence-top.sequence-bottom {
|
|
71
|
+
> li:first-child:last-child::after {
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.sequence-icon {
|
|
77
|
+
top: ((@sequence-step-height / 2) - (@sequence-icon-size / 2) + @sequence-item-spacing-mobile);
|
|
78
|
+
|
|
79
|
+
@media (min-width: @screen-md-min) {
|
|
80
|
+
top: ((@sequence-step-height / 2) - (@sequence-icon-size / 2) + @sequence-item-spacing-desktop);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.sequence-top > li:first-child .sequence-icon {
|
|
85
|
+
top: (((@sequence-step-height / 2) - (@sequence-icon-size / 2)) + @sequence-outside-spacing);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.sequence-horizontal-spacing(
|
|
90
|
+
@sequence-item-padding,
|
|
91
|
+
@sequence-pip-size,
|
|
92
|
+
@sequence-icon-sm,
|
|
93
|
+
@sequence-icon-md,
|
|
94
|
+
@sequence-icon-lg
|
|
95
|
+
) {
|
|
96
|
+
.padding(left, @sequence-item-padding);
|
|
97
|
+
|
|
98
|
+
> li {
|
|
99
|
+
&::before {
|
|
100
|
+
.margin(left, (-@sequence-item-padding - (@sequence-pip-size / 2) + 1px));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&::after {
|
|
104
|
+
.left(-@sequence-item-padding);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sequence-icon {
|
|
109
|
+
.margin(left, (-@sequence-item-padding - (@sequence-icon-sm / 2) + 1px));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sequence-icon-md {
|
|
113
|
+
.margin(left, (-@sequence-item-padding - (@sequence-icon-md / 2) + 1px));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.sequence-icon-lg {
|
|
117
|
+
.margin(left, (-@sequence-item-padding - (@sequence-icon-lg / 2) + 1px));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.sequence-variant(@type, @color) {
|
|
122
|
+
@variant: ~".sequence-@{type}";
|
|
123
|
+
|
|
124
|
+
@{variant} {
|
|
125
|
+
.sequence-variant-detail(
|
|
126
|
+
@color,
|
|
127
|
+
@pip-offset-sm, @pip-offset-md, @pip-offset-lg,
|
|
128
|
+
var(--color-border-neutral), @color-navy-border-neutral, @sequence-margin-lg
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@keyframes ~"sequence-pip-@{type}" {
|
|
133
|
+
from { border-color: @color-navy-border-neutral; }
|
|
134
|
+
to { border-color: @color; }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// TODO update description
|
|
139
|
+
// The line for the active item needs to be the active colour before the 'pip' and
|
|
140
|
+
// the inactive colour afterwards. This is tricky because we don't know the height.
|
|
141
|
+
// However, we can achieve this with one element by using a gradient with a hard
|
|
142
|
+
// transition between colours at the right point. We need several variants to cover
|
|
143
|
+
// our large and inverse options.
|
|
144
|
+
|
|
145
|
+
.sequence-variant-detail(
|
|
146
|
+
@color,
|
|
147
|
+
@pip-offset-sm,
|
|
148
|
+
@pip-offset-md,
|
|
149
|
+
@pip-offset-lg,
|
|
150
|
+
@sequence-border,
|
|
151
|
+
@sequence-inverse-border,
|
|
152
|
+
@sequence-margin
|
|
153
|
+
) {
|
|
154
|
+
> li {
|
|
155
|
+
border-color: @color;
|
|
156
|
+
|
|
157
|
+
&::after {
|
|
158
|
+
background-image: linear-gradient(@color 0, @color 50%, @sequence-border 50%, @sequence-border 100%);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.sequence-inverse > li {
|
|
163
|
+
&::after {
|
|
164
|
+
background-image:
|
|
165
|
+
linear-gradient(
|
|
166
|
+
@color 0,
|
|
167
|
+
@color 50%,
|
|
168
|
+
@sequence-inverse-border 50%,
|
|
169
|
+
@sequence-inverse-border 100%
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
> .active {
|
|
175
|
+
&::before {
|
|
176
|
+
border-color: @color;
|
|
177
|
+
background-color: @color;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.sequence-animation-variant(@type) {
|
|
183
|
+
> li::before {
|
|
184
|
+
animation:
|
|
185
|
+
@speed-per-item linear 0.3s both ~"sequence-pip-@{type}",
|
|
186
|
+
@speed-per-pulse linear 0.3s forwards ~"sequence-pulse-@{type}";
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
> .active::before {
|
|
190
|
+
animation:
|
|
191
|
+
@speed-per-item linear 0.3s both ~"sequence-pip-@{type}",
|
|
192
|
+
@speed-per-pulse linear 0.3s infinite ~"sequence-pulse-@{type}";
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.sequence-animation-delays(@counter) when (@counter > 0) {
|
|
197
|
+
.sequence-animation-delays((@counter - 1));
|
|
198
|
+
|
|
199
|
+
> li:nth-child(@{counter}):before,
|
|
200
|
+
> li:nth-child(@{counter}):after {
|
|
201
|
+
animation-delay: (@counter * @speed-per-item) !important;
|
|
202
|
+
}
|
|
203
|
+
}
|