@cfx-dev/ui-components 3.0.0 → 3.0.1

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.
@@ -1,359 +1,359 @@
1
- @use "sass:math";
2
- @use "sass:map";
3
- @use "sass:meta";
4
- @use "colors";
5
-
6
- @mixin def($var, $value) {
7
- --#{$var}: #{$value};
8
- }
9
- @function use($var, $default: initial) {
10
- @return var(--#{$var}, $default);
11
- }
12
-
13
- @function color($name, $luminance: 'pure', $alpha: 1.0) {
14
- @if $luminance == 'pure' {
15
- @return rgba(var(--color-#{$name}), #{$alpha});
16
- }
17
-
18
- @return rgba(var(--color-#{$name}-#{$luminance}), #{$alpha});
19
- }
20
-
21
- @function offset($size: 'normal') {
22
- @return var(--offset-#{$size});
23
- }
24
-
25
- @function q($multiplier: 1) {
26
- @if $multiplier == 1 {
27
- @return var(--quant);
28
- }
29
-
30
- @return calc(var(--quant) * #{$multiplier});
31
- }
32
-
33
- @function control-height($size: 'normal') {
34
- @return var(--control-height-#{$size});
35
- }
36
-
37
- @function font-size($size: 'normal') {
38
- @return var(--font-size-#{$size});
39
- }
40
-
41
- @function font-weight($weight: 'normal') {
42
- @return var(--font-weight-#{$weight});
43
- }
44
-
45
- @function negative($cssValue) {
46
- @return calc(-1 * #{$cssValue});
47
- }
48
-
49
- @function border-radius($size: 'normal') {
50
- @return var(--border-radius-#{$size});
51
- }
52
-
53
- @function viewport-width($multiplier: 1.0) {
54
- @return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
55
- }
56
- @function viewport-height($multiplier: 1.0) {
57
- @return calc((var(--height) - var(--offset-safezone) * 2) * #{$multiplier});
58
- }
59
-
60
- $cfxui-color-luminance: (
61
- 'pure',
62
- 950,
63
- 900,
64
- 800,
65
- 700,
66
- 600,
67
- 500,
68
- 400,
69
- 300,
70
- 200,
71
- 100,
72
- 50,
73
- );
74
-
75
- $cfxui-color-alpha: (
76
- '100': 1,
77
- '90': 0.9,
78
- '80': 0.8,
79
- '70': 0.7,
80
- '60': 0.6,
81
- '50': 0.5,
82
- '40': 0.4,
83
- '30': 0.3,
84
- '20': 0.2,
85
- '10': 0.1,
86
- );
87
-
88
- @mixin define-font-size($name, $size, $line-height: 1.3) {
89
- @include def('font-size-#{$name}', $size);
90
- @include def('line-height-#{$name}', $line-height);
91
- }
92
-
93
- @mixin define-color($name, $color, $bg, $fg) {
94
- .cfx-color-#{$name} { color: $color }
95
-
96
- --color-#{$name}: #{colors.color-triplet($color)};
97
- --color-#{$name}-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 1, 7))};
98
- --color-#{$name}-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 2, 7))};
99
- --color-#{$name}-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 3, 7))};
100
- --color-#{$name}-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 4, 7))};
101
- --color-#{$name}-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 5, 7))};
102
- --color-#{$name}-500: #{colors.color-triplet($color)};
103
- --color-#{$name}-600: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 1, 7))};
104
- --color-#{$name}-700: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 2, 7))};
105
- --color-#{$name}-800: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 3, 7))};
106
- --color-#{$name}-900: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 4, 7))};
107
- --color-#{$name}-950: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 5, 7))};
108
- }
109
-
110
- @mixin define-main-color($bg, $fg) {
111
- --color-main: #{colors.color-triplet($bg)};
112
- --color-main-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 1, 12))};
113
- --color-main-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 2, 12))};
114
- --color-main-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 3, 12))};
115
- --color-main-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 4, 12))};
116
- --color-main-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 5, 12))};
117
- --color-main-500: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 6, 12))};
118
- --color-main-600: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 7, 12))};
119
- --color-main-700: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 8, 12))};
120
- --color-main-800: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 9, 12))};
121
- --color-main-900: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 10, 12))};
122
- --color-main-950: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 11, 12))};
123
- }
124
-
125
- @mixin define-main-colors($bg, $fg, $overrides: ()) {
126
- $colors: map-merge((
127
- 'primary': #f50551,
128
- 'success': #01a370,
129
- 'warning': #ffae00,
130
- 'error': #ff2600,
131
- 'teal': #007892,
132
- 'aurum': #aa6f0d,
133
- 'silver': #a5a5a5
134
- ), $overrides);
135
-
136
- @include define-main-color($bg, $fg);
137
-
138
- @each $colorName, $colorValue in $colors {
139
- @include define-color($colorName, $colorValue, $bg, $fg);
140
- }
141
- }
142
-
143
- @mixin define-theme($bg, $fg, $overrides: ()) {
144
- $colors: map-merge((
145
- 'accent': #F40552,
146
- 'primary': #F1F1E4,
147
- 'secondary': #9EA4BD,
148
- 'tertiary': #FF75AC,
149
- 'green': #22BF4E,
150
- 'yellow': #FDA640,
151
- 'red': #E33131,
152
- 'argentum': #A3A3A3,
153
- 'aurum': #BFA45E,
154
- 'platinum': #F1F1F1,
155
- 'bg': #11131C,
156
- 'bg-light': #1C202E,
157
- 'bg-dark': #1C202E,
158
- 'bg-dark-grey': #1A1A1A,
159
- 'bg-black': #000000,
160
- ), $overrides);
161
-
162
- @each $colorName, $colorValue in $colors {
163
- @include define-color($colorName, $colorValue, $bg, $fg);
164
- }
165
- }
166
-
167
- @mixin define-color-token($name, $color) {
168
- --color-#{$name}: #{$color};
169
- }
170
- @function color-token($name, ) {
171
- @return var(--color-#{$name});
172
- }
173
-
174
-
175
- @mixin border-radius($size: 'normal') {
176
- border-radius: var(--border-radius-#{$size});
177
- }
178
-
179
- @mixin font-size($size: 'normal') {
180
- font-size: var(--font-size-#{$size});
181
- }
182
- @mixin font-family($family: 'primary') {
183
- font-family: var(--font-family-#{$family});
184
- }
185
- @mixin font-weight($weight: 'normal') {
186
- font-weight: var(--font-weight-#{$weight});
187
- }
188
- @mixin font-color($colorToken) {
189
- color: color-token($colorToken);
190
- }
191
-
192
- @mixin letter-spacing($size: 'normal') {
193
- letter-spacing: var(--letter-spacing-#{$size});
194
- }
195
-
196
- @mixin line-height($size: 'normal') {
197
- line-height: var(--line-height-#{$size});
198
- }
199
-
200
- @mixin animated($props: 'all', $subClass: '&') {
201
- @if type-of($props) == 'list' {
202
- $transition: ();
203
- @each $property in $props {
204
- $transition: append(
205
- $transition, ($property .25s ease), $separator: comma
206
- );
207
- }
208
- #{$subClass} {
209
- transition: $transition,
210
- outline-offset 0s,
211
- outline 0s;
212
- }
213
- } @else {
214
- #{$subClass} {
215
- transition: #{$props} .25s ease,
216
- outline-offset 0s,
217
- outline 0s;
218
- }
219
- }
220
- }
221
-
222
- @mixin fake-backdrop-blur($topLayer: false, $topLayerBlend: false, $topLayerSize: false, $topLayerAttachement: false) {
223
- --_backdrop-color: var(--backdrop-color, transparent);
224
- --_backdrop-image-blur: var(--backdrop-image-blur, url(assets/images/bg2-blur.png));
225
-
226
- @if not $topLayer {
227
- $topLayer: linear-gradient(use('_backdrop-color'), use('_backdrop-color'));
228
- }
229
-
230
- @if not $topLayerBlend {
231
- $topLayerBlend: normal;
232
- }
233
-
234
- @if not $topLayerSize {
235
- $topLayerSize: cover;
236
- }
237
-
238
- @if not $topLayerAttachement {
239
- $topLayerAttachement: scroll;
240
- }
241
-
242
- background-color: use('_backdrop-color');
243
- background-image:
244
- $topLayer,
245
- linear-gradient(color-token('backdrop-shader'), color-token('backdrop-shader')),
246
- use('_backdrop-image-blur'),
247
- use('_backdrop-image-blur');
248
- background-blend-mode: $topLayerBlend, normal, overlay;
249
- background-size: $topLayerSize, cover, cover, cover;
250
- background-attachment: $topLayerAttachement, scroll, fixed, fixed;
251
- }
252
-
253
- $offsets: (
254
- 'none': 0px,
255
- 'hairthin': 1px,
256
- 'thin': 2px,
257
- 'xxsmall': q(.25),
258
- 'xsmall': q(.5),
259
- 'small': q(1),
260
- 'normal': q(2),
261
- 'medium': q(2.5),
262
- 'large': q(4),
263
- 'xlarge': q(6),
264
- 'safezone': q(8),
265
- );
266
-
267
- @mixin offset-classes($prefix: 'offset', $property: 'gap') {
268
- @each $name, $value in $offsets {
269
- &.#{$prefix}-#{$name} {
270
- #{$property}: offset('#{$name}');
271
- }
272
- }
273
- }
274
-
275
- @mixin webkit-scrollbar() {
276
- ::-webkit-scrollbar {
277
- width: use('scrollable-thumb-size');
278
- }
279
- ::-webkit-scrollbar:horizontal {
280
- height: use('scrollable-thumb-size');
281
- }
282
- ::-webkit-scrollbar-track {
283
- background-color: color-token('scrollbar-track-background');
284
- }
285
- ::-webkit-scrollbar-thumb {
286
- @include border-radius('pill');
287
-
288
- background-color: color-token('scrollbar');
289
-
290
- &:hover {
291
- background-color: color-token('scrollbar-hover');
292
- }
293
- &:active {
294
- background-color: color-token('scrollbar-active');
295
- }
296
- }
297
- ::-webkit-scrollbar-corner {
298
- display: none;
299
- }
300
- }
301
-
302
- @mixin placeholder-color($color) {
303
- &::placeholder {color: $color}
304
- &::-webkit-input-placeholder {color: $color}
305
- &::-moz-placeholder {color: $color}
306
- &:-ms-input-placeholder {color: $color}
307
- }
308
-
309
- @mixin placeholder-animated($props: 'all', $subClass: '&') {
310
- &::placeholder {@include animated($props, $subClass)}
311
- &::-webkit-input-placeholder {@include animated($props, $subClass)}
312
- &::-moz-placeholder {@include animated($props, $subClass)}
313
- &:-ms-input-placeholder {@include animated($props, $subClass)}
314
- }
315
-
316
- $zindexMap: (
317
- 'zero': 0,
318
- 'first': 1,
319
- 'second': 2,
320
- 'max': 9000,
321
- );
322
-
323
- @function zindex($index) {
324
- @return map.get($zindexMap, $index);
325
- }
326
-
327
- $mediaMap: (
328
- 'initial': 0px,
329
- 'xxsmall': 360px,
330
- 'xsmall': 640px,
331
- 'small': 768px,
332
- 'medium': 1024px,
333
- 'large': 1280px,
334
- 'xlarge': 1536px,
335
- );
336
-
337
- @mixin media-max($size: 'medium', $fix: 'empty') {
338
- @if $fix == 'empty' {
339
- @if $size == 'initial' {
340
- @content;
341
- } @else {
342
- @media (min-width: calc(map.get($mediaMap, $size) - 1px)) { @content; }
343
- }
344
- } @else {
345
- @media (min-width: $fix) { @content; }
346
- }
347
- }
348
-
349
- @mixin media-min($size: 'medium', $fix: 'empty') {
350
- @if $fix == 'empty' {
351
- @if $size == 'initial' {
352
- @content;
353
- } @else {
354
- @media (min-width: map.get($mediaMap, $size)) { @content; }
355
- }
356
- } @else {
357
- @media (min-width: $fix) { @content; }
358
- }
359
- }
1
+ @use "sass:math";
2
+ @use "sass:map";
3
+ @use "sass:meta";
4
+ @use "colors";
5
+
6
+ @mixin def($var, $value) {
7
+ --#{$var}: #{$value};
8
+ }
9
+ @function use($var, $default: initial) {
10
+ @return var(--#{$var}, $default);
11
+ }
12
+
13
+ @function color($name, $luminance: 'pure', $alpha: 1.0) {
14
+ @if $luminance == 'pure' {
15
+ @return rgba(var(--color-#{$name}), #{$alpha});
16
+ }
17
+
18
+ @return rgba(var(--color-#{$name}-#{$luminance}), #{$alpha});
19
+ }
20
+
21
+ @function offset($size: 'normal') {
22
+ @return var(--offset-#{$size});
23
+ }
24
+
25
+ @function q($multiplier: 1) {
26
+ @if $multiplier == 1 {
27
+ @return var(--quant);
28
+ }
29
+
30
+ @return calc(var(--quant) * #{$multiplier});
31
+ }
32
+
33
+ @function control-height($size: 'normal') {
34
+ @return var(--control-height-#{$size});
35
+ }
36
+
37
+ @function font-size($size: 'normal') {
38
+ @return var(--font-size-#{$size});
39
+ }
40
+
41
+ @function font-weight($weight: 'normal') {
42
+ @return var(--font-weight-#{$weight});
43
+ }
44
+
45
+ @function negative($cssValue) {
46
+ @return calc(-1 * #{$cssValue});
47
+ }
48
+
49
+ @function border-radius($size: 'normal') {
50
+ @return var(--border-radius-#{$size});
51
+ }
52
+
53
+ @function viewport-width($multiplier: 1.0) {
54
+ @return calc((var(--width) - var(--offset-safezone) * 2) * #{$multiplier});
55
+ }
56
+ @function viewport-height($multiplier: 1.0) {
57
+ @return calc((var(--height) - var(--offset-safezone) * 2) * #{$multiplier});
58
+ }
59
+
60
+ $cfxui-color-luminance: (
61
+ 'pure',
62
+ 950,
63
+ 900,
64
+ 800,
65
+ 700,
66
+ 600,
67
+ 500,
68
+ 400,
69
+ 300,
70
+ 200,
71
+ 100,
72
+ 50,
73
+ );
74
+
75
+ $cfxui-color-alpha: (
76
+ '100': 1,
77
+ '90': 0.9,
78
+ '80': 0.8,
79
+ '70': 0.7,
80
+ '60': 0.6,
81
+ '50': 0.5,
82
+ '40': 0.4,
83
+ '30': 0.3,
84
+ '20': 0.2,
85
+ '10': 0.1,
86
+ );
87
+
88
+ @mixin define-font-size($name, $size, $line-height: 1.3) {
89
+ @include def('font-size-#{$name}', $size);
90
+ @include def('line-height-#{$name}', $line-height);
91
+ }
92
+
93
+ @mixin define-color($name, $color, $bg, $fg) {
94
+ .cfx-color-#{$name} { color: $color }
95
+
96
+ --color-#{$name}: #{colors.color-triplet($color)};
97
+ --color-#{$name}-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 1, 7))};
98
+ --color-#{$name}-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 2, 7))};
99
+ --color-#{$name}-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 3, 7))};
100
+ --color-#{$name}-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 4, 7))};
101
+ --color-#{$name}-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $color, 5, 7))};
102
+ --color-#{$name}-500: #{colors.color-triplet($color)};
103
+ --color-#{$name}-600: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 1, 7))};
104
+ --color-#{$name}-700: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 2, 7))};
105
+ --color-#{$name}-800: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 3, 7))};
106
+ --color-#{$name}-900: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 4, 7))};
107
+ --color-#{$name}-950: #{colors.color-triplet(colors.lab-gradient-step($color, $fg, 5, 7))};
108
+ }
109
+
110
+ @mixin define-main-color($bg, $fg) {
111
+ --color-main: #{colors.color-triplet($bg)};
112
+ --color-main-50: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 1, 12))};
113
+ --color-main-100: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 2, 12))};
114
+ --color-main-200: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 3, 12))};
115
+ --color-main-300: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 4, 12))};
116
+ --color-main-400: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 5, 12))};
117
+ --color-main-500: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 6, 12))};
118
+ --color-main-600: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 7, 12))};
119
+ --color-main-700: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 8, 12))};
120
+ --color-main-800: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 9, 12))};
121
+ --color-main-900: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 10, 12))};
122
+ --color-main-950: #{colors.color-triplet(colors.lab-gradient-step($bg, $fg, 11, 12))};
123
+ }
124
+
125
+ @mixin define-main-colors($bg, $fg, $overrides: ()) {
126
+ $colors: map-merge((
127
+ 'primary': #f50551,
128
+ 'success': #01a370,
129
+ 'warning': #ffae00,
130
+ 'error': #ff2600,
131
+ 'teal': #007892,
132
+ 'aurum': #aa6f0d,
133
+ 'silver': #a5a5a5
134
+ ), $overrides);
135
+
136
+ @include define-main-color($bg, $fg);
137
+
138
+ @each $colorName, $colorValue in $colors {
139
+ @include define-color($colorName, $colorValue, $bg, $fg);
140
+ }
141
+ }
142
+
143
+ @mixin define-theme($bg, $fg, $overrides: ()) {
144
+ $colors: map-merge((
145
+ 'accent': #F40552,
146
+ 'primary': #F1F1E4,
147
+ 'secondary': #9EA4BD,
148
+ 'tertiary': #FF75AC,
149
+ 'green': #22BF4E,
150
+ 'yellow': #FDA640,
151
+ 'red': #E33131,
152
+ 'argentum': #A3A3A3,
153
+ 'aurum': #BFA45E,
154
+ 'platinum': #F1F1F1,
155
+ 'bg': #11131C,
156
+ 'bg-light': #1C202E,
157
+ 'bg-dark': #1C202E,
158
+ 'bg-dark-grey': #1A1A1A,
159
+ 'bg-black': #000000,
160
+ ), $overrides);
161
+
162
+ @each $colorName, $colorValue in $colors {
163
+ @include define-color($colorName, $colorValue, $bg, $fg);
164
+ }
165
+ }
166
+
167
+ @mixin define-color-token($name, $color) {
168
+ --color-#{$name}: #{$color};
169
+ }
170
+ @function color-token($name, ) {
171
+ @return var(--color-#{$name});
172
+ }
173
+
174
+
175
+ @mixin border-radius($size: 'normal') {
176
+ border-radius: var(--border-radius-#{$size});
177
+ }
178
+
179
+ @mixin font-size($size: 'normal') {
180
+ font-size: var(--font-size-#{$size});
181
+ }
182
+ @mixin font-family($family: 'primary') {
183
+ font-family: var(--font-family-#{$family});
184
+ }
185
+ @mixin font-weight($weight: 'normal') {
186
+ font-weight: var(--font-weight-#{$weight});
187
+ }
188
+ @mixin font-color($colorToken) {
189
+ color: color-token($colorToken);
190
+ }
191
+
192
+ @mixin letter-spacing($size: 'normal') {
193
+ letter-spacing: var(--letter-spacing-#{$size});
194
+ }
195
+
196
+ @mixin line-height($size: 'normal') {
197
+ line-height: var(--line-height-#{$size});
198
+ }
199
+
200
+ @mixin animated($props: 'all', $subClass: '&') {
201
+ @if type-of($props) == 'list' {
202
+ $transition: ();
203
+ @each $property in $props {
204
+ $transition: append(
205
+ $transition, ($property .25s ease), $separator: comma
206
+ );
207
+ }
208
+ #{$subClass} {
209
+ transition: $transition,
210
+ outline-offset 0s,
211
+ outline 0s;
212
+ }
213
+ } @else {
214
+ #{$subClass} {
215
+ transition: #{$props} .25s ease,
216
+ outline-offset 0s,
217
+ outline 0s;
218
+ }
219
+ }
220
+ }
221
+
222
+ @mixin fake-backdrop-blur($topLayer: false, $topLayerBlend: false, $topLayerSize: false, $topLayerAttachement: false) {
223
+ --_backdrop-color: var(--backdrop-color, transparent);
224
+ --_backdrop-image-blur: var(--backdrop-image-blur, url(assets/images/bg2-blur.png));
225
+
226
+ @if not $topLayer {
227
+ $topLayer: linear-gradient(use('_backdrop-color'), use('_backdrop-color'));
228
+ }
229
+
230
+ @if not $topLayerBlend {
231
+ $topLayerBlend: normal;
232
+ }
233
+
234
+ @if not $topLayerSize {
235
+ $topLayerSize: cover;
236
+ }
237
+
238
+ @if not $topLayerAttachement {
239
+ $topLayerAttachement: scroll;
240
+ }
241
+
242
+ background-color: use('_backdrop-color');
243
+ background-image:
244
+ $topLayer,
245
+ linear-gradient(color-token('backdrop-shader'), color-token('backdrop-shader')),
246
+ use('_backdrop-image-blur'),
247
+ use('_backdrop-image-blur');
248
+ background-blend-mode: $topLayerBlend, normal, overlay;
249
+ background-size: $topLayerSize, cover, cover, cover;
250
+ background-attachment: $topLayerAttachement, scroll, fixed, fixed;
251
+ }
252
+
253
+ $offsets: (
254
+ 'none': 0px,
255
+ 'hairthin': 1px,
256
+ 'thin': 2px,
257
+ 'xxsmall': q(.25),
258
+ 'xsmall': q(.5),
259
+ 'small': q(1),
260
+ 'normal': q(2),
261
+ 'medium': q(2.5),
262
+ 'large': q(4),
263
+ 'xlarge': q(6),
264
+ 'safezone': q(8),
265
+ );
266
+
267
+ @mixin offset-classes($prefix: 'offset', $property: 'gap') {
268
+ @each $name, $value in $offsets {
269
+ &.#{$prefix}-#{$name} {
270
+ #{$property}: offset('#{$name}');
271
+ }
272
+ }
273
+ }
274
+
275
+ @mixin webkit-scrollbar() {
276
+ ::-webkit-scrollbar {
277
+ width: use('scrollable-thumb-size');
278
+ }
279
+ ::-webkit-scrollbar:horizontal {
280
+ height: use('scrollable-thumb-size');
281
+ }
282
+ ::-webkit-scrollbar-track {
283
+ background-color: color-token('scrollbar-track-background');
284
+ }
285
+ ::-webkit-scrollbar-thumb {
286
+ @include border-radius('pill');
287
+
288
+ background-color: color-token('scrollbar');
289
+
290
+ &:hover {
291
+ background-color: color-token('scrollbar-hover');
292
+ }
293
+ &:active {
294
+ background-color: color-token('scrollbar-active');
295
+ }
296
+ }
297
+ ::-webkit-scrollbar-corner {
298
+ display: none;
299
+ }
300
+ }
301
+
302
+ @mixin placeholder-color($color) {
303
+ &::placeholder {color: $color}
304
+ &::-webkit-input-placeholder {color: $color}
305
+ &::-moz-placeholder {color: $color}
306
+ &:-ms-input-placeholder {color: $color}
307
+ }
308
+
309
+ @mixin placeholder-animated($props: 'all', $subClass: '&') {
310
+ &::placeholder {@include animated($props, $subClass)}
311
+ &::-webkit-input-placeholder {@include animated($props, $subClass)}
312
+ &::-moz-placeholder {@include animated($props, $subClass)}
313
+ &:-ms-input-placeholder {@include animated($props, $subClass)}
314
+ }
315
+
316
+ $zindexMap: (
317
+ 'zero': 0,
318
+ 'first': 1,
319
+ 'second': 2,
320
+ 'max': 9000,
321
+ );
322
+
323
+ @function zindex($index) {
324
+ @return map.get($zindexMap, $index);
325
+ }
326
+
327
+ $mediaMap: (
328
+ 'initial': 0px,
329
+ 'xxsmall': 360px,
330
+ 'xsmall': 640px,
331
+ 'small': 768px,
332
+ 'medium': 1024px,
333
+ 'large': 1280px,
334
+ 'xlarge': 1536px,
335
+ );
336
+
337
+ @mixin media-max($size: 'medium', $fix: 'empty') {
338
+ @if $fix == 'empty' {
339
+ @if $size == 'initial' {
340
+ @content;
341
+ } @else {
342
+ @media (min-width: calc(map.get($mediaMap, $size) - 1px)) { @content; }
343
+ }
344
+ } @else {
345
+ @media (min-width: $fix) { @content; }
346
+ }
347
+ }
348
+
349
+ @mixin media-min($size: 'medium', $fix: 'empty') {
350
+ @if $fix == 'empty' {
351
+ @if $size == 'initial' {
352
+ @content;
353
+ } @else {
354
+ @media (min-width: map.get($mediaMap, $size)) { @content; }
355
+ }
356
+ } @else {
357
+ @media (min-width: $fix) { @content; }
358
+ }
359
+ }