material 3.7.2 → 3.7.3
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/README.md +2 -2
- package/dist/components/slider/features/controller.js +24 -8
- package/dist/elements/css/card.css +1 -1
- package/dist/elements/css/card.js +1 -1
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/dialog.js +1 -1
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +1 -1
- package/dist/elements/css/select.css +1 -1
- package/dist/elements/css/select.js +1 -1
- package/dist/elements/css/slider.css +1 -1
- package/dist/elements/css/slider.js +1 -1
- package/dist/elements/css/tabs.css +1 -1
- package/dist/elements/css/tabs.js +1 -1
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/timepicker.js +1 -1
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +2 -2
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +2 -2
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/package.json +2 -1
- package/src/styles/abstract/_base.scss +0 -1
- package/src/styles/abstract/_direction.scss +121 -152
- package/src/styles/abstract/_emit.scss +7 -16
- package/src/styles/abstract/_floating-placement.scss +9 -10
- package/src/styles/abstract/_functions.scss +64 -79
- package/src/styles/abstract/_mixins.scss +355 -459
- package/src/styles/abstract/_theme.scss +122 -136
- package/src/styles/abstract/_variables.scss +320 -390
- package/src/styles/abstract/chips/_assist.scss +2 -3
- package/src/styles/abstract/chips/_filter.scss +2 -3
- package/src/styles/abstract/chips/_input.scss +2 -3
- package/src/styles/abstract/chips/_suggestion.scss +2 -3
- package/src/styles/base/_body-theme.scss +10 -15
- package/src/styles/base/_document.scss +10 -33
- package/src/styles/base/_reset.scss +20 -40
- package/src/styles/base/_tokens.scss +6 -21
- package/src/styles/base/_typescale-tokens.scss +12 -16
- package/src/styles/base/_typography.scss +28 -37
- package/src/styles/components/_badge.scss +171 -193
- package/src/styles/components/_bottom-app-bar.scss +72 -90
- package/src/styles/components/_bottom-sheet.scss +188 -232
- package/src/styles/components/_button-group.scss +140 -189
- package/src/styles/components/_button.scss +382 -478
- package/src/styles/components/_card.scss +349 -473
- package/src/styles/components/_carousel.scss +134 -156
- package/src/styles/components/_checkbox.scss +208 -249
- package/src/styles/components/_chips.scss +239 -304
- package/src/styles/components/_datepicker.scss +172 -222
- package/src/styles/components/_dialog.scss +428 -553
- package/src/styles/components/_divider.scss +37 -46
- package/src/styles/components/_drawer.scss +571 -678
- package/src/styles/components/_extended-fab.scss +263 -294
- package/src/styles/components/_fab-menu.scss +225 -267
- package/src/styles/components/_fab.scss +197 -218
- package/src/styles/components/_icon-button.scss +483 -588
- package/src/styles/components/_list.scss +115 -144
- package/src/styles/components/_loading-indicator.scss +23 -29
- package/src/styles/components/_menu.scss +543 -699
- package/src/styles/components/_navigation-bar.scss +189 -234
- package/src/styles/components/_navigation-rail.scss +256 -312
- package/src/styles/components/_progress.scss +60 -85
- package/src/styles/components/_radios.scss +170 -207
- package/src/styles/components/_search.scss +369 -455
- package/src/styles/components/_select.scss +78 -185
- package/src/styles/components/_side-sheet.scss +234 -292
- package/src/styles/components/_slider.scss +289 -367
- package/src/styles/components/_snackbar.scss +149 -198
- package/src/styles/components/_split-button.scss +139 -228
- package/src/styles/components/_switch.scss +282 -349
- package/src/styles/components/_tabs.scss +350 -547
- package/src/styles/components/_text-field.scss +788 -980
- package/src/styles/components/_timepicker.scss +435 -506
- package/src/styles/components/_toolbar.scss +178 -242
- package/src/styles/components/_tooltip.scss +152 -197
- package/src/styles/components/_top-app-bar.scss +206 -230
- package/src/styles/elements/_badge.scss +42 -61
- package/src/styles/elements/_bottom-app-bar.scss +14 -20
- package/src/styles/elements/_bottom-sheet.scss +0 -3
- package/src/styles/elements/_button-group.scss +80 -80
- package/src/styles/elements/_button.scss +72 -88
- package/src/styles/elements/_card.scss +48 -57
- package/src/styles/elements/_carousel.scss +2 -5
- package/src/styles/elements/_checkbox.scss +32 -43
- package/src/styles/elements/_chips.scss +18 -22
- package/src/styles/elements/_config.scss +11 -26
- package/src/styles/elements/_datepicker.scss +17 -22
- package/src/styles/elements/_dialog.scss +0 -3
- package/src/styles/elements/_divider.scss +11 -13
- package/src/styles/elements/_drawer.scss +9 -14
- package/src/styles/elements/_extended-fab.scss +36 -40
- package/src/styles/elements/_fab-menu.scss +21 -25
- package/src/styles/elements/_fab.scss +17 -20
- package/src/styles/elements/_field.scss +93 -114
- package/src/styles/elements/_icon-button.scss +34 -38
- package/src/styles/elements/_index.scss +0 -4
- package/src/styles/elements/_list.scss +19 -26
- package/src/styles/elements/_loading-indicator.scss +6 -9
- package/src/styles/elements/_menu.scss +0 -3
- package/src/styles/elements/_navigation-bar.scss +5 -9
- package/src/styles/elements/_navigation-rail.scss +10 -15
- package/src/styles/elements/_progress.scss +15 -18
- package/src/styles/elements/_radios.scss +24 -49
- package/src/styles/elements/_search.scss +19 -24
- package/src/styles/elements/_select.scss +4 -9
- package/src/styles/elements/_side-sheet.scss +0 -3
- package/src/styles/elements/_slider.scss +15 -35
- package/src/styles/elements/_snackbar.scss +0 -3
- package/src/styles/elements/_split-button.scss +33 -39
- package/src/styles/elements/_switch.scss +50 -90
- package/src/styles/elements/_tabs.scss +9 -13
- package/src/styles/elements/_text-field.scss +150 -178
- package/src/styles/elements/_timepicker.scss +0 -3
- package/src/styles/elements/_toolbar.scss +30 -35
- package/src/styles/elements/_tooltip.scss +0 -3
- package/src/styles/elements/_top-app-bar.scss +38 -45
- package/src/styles/main.scss +0 -15
- package/src/styles/themes/_autumn.scss +240 -258
- package/src/styles/themes/_base-theme.scss +96 -128
- package/src/styles/themes/_baseline.scss +273 -314
- package/src/styles/themes/_brownbeige.scss +242 -250
- package/src/styles/themes/_content.scss +240 -248
- package/src/styles/themes/_desert.scss +242 -250
- package/src/styles/themes/_expressive.scss +242 -250
- package/src/styles/themes/_fidelity.scss +240 -248
- package/src/styles/themes/_forest.scss +242 -259
- package/src/styles/themes/_fruit-salad.scss +242 -250
- package/src/styles/themes/_highcontrast.scss +164 -172
- package/src/styles/themes/_index.scss +0 -1
- package/src/styles/themes/_monochrome.scss +226 -234
- package/src/styles/themes/_neutral.scss +242 -250
- package/src/styles/themes/_ocean.scss +242 -259
- package/src/styles/themes/_rainbow.scss +242 -250
- package/src/styles/themes/_sageivory.scss +242 -250
- package/src/styles/themes/_spring.scss +238 -255
- package/src/styles/themes/_summer.scss +242 -250
- package/src/styles/themes/_sunset.scss +242 -259
- package/src/styles/themes/_tealcaramel.scss +242 -250
- package/src/styles/themes/_vibrant.scss +242 -250
- package/src/styles/utilities/_colors.scss +44 -50
- package/src/styles/utilities/_flexbox.scss +48 -59
- package/src/styles/utilities/_layout.scss +516 -591
- package/src/styles/utilities/_ripple.scss +61 -70
- package/src/styles/utilities/_spacing.scss +120 -127
- package/src/styles/utilities/_typography.scss +45 -58
- package/src/styles/utilities/_visibility.scss +61 -76
- package/dist/package.json +0 -488
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// src/styles/abstract/_mixins.scss
|
|
2
1
|
@use 'sass:map';
|
|
3
2
|
@use 'sass:list';
|
|
4
3
|
@use 'sass:math';
|
|
@@ -7,551 +6,448 @@
|
|
|
7
6
|
@use 'functions' as f;
|
|
8
7
|
@use 'emit' as emit;
|
|
9
8
|
|
|
10
|
-
// Common icons map
|
|
11
9
|
$icons: (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
'chevron_right': 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="9 18 15 12 9 6"%3E%3C/polyline%3E%3C/svg%3E',
|
|
11
|
+
'chevron_down': 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E',
|
|
12
|
+
'check': 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="20 6 9 17 4 12"%3E%3C/polyline%3E%3C/svg%3E'
|
|
15
13
|
);
|
|
16
14
|
|
|
17
15
|
@mixin icon($name, $size: 24px) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Typography
|
|
16
|
+
$icon-url: map.get($icons, $name);
|
|
17
|
+
@if $icon-url {
|
|
18
|
+
content: '';
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: $size;
|
|
21
|
+
height: $size;
|
|
22
|
+
background-image: url($icon-url);
|
|
23
|
+
background-size: contain;
|
|
24
|
+
background-position: center;
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
32
29
|
@mixin typography($scale) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/// A typescale role through its custom properties: the
|
|
44
|
-
/// `--{prefix}-sys-typescale-{role}-*` tokens base/_tokens.scss emits from the
|
|
45
|
-
/// same map, so setting `--{prefix}-ref-typeface-brand`/`-plain`, or a size
|
|
46
|
-
/// token, reaches everything that uses it.
|
|
30
|
+
$styles: f.get-typography($scale);
|
|
31
|
+
font-family: var(--#{base.$prefix}-ref-typeface-#{f.typeface($scale)}, #{map.get($styles, 'font-family')});
|
|
32
|
+
font-size: map.get($styles, 'font-size');
|
|
33
|
+
line-height: map.get($styles, 'line-height');
|
|
34
|
+
letter-spacing: map.get($styles, 'letter-spacing');
|
|
35
|
+
font-weight: map.get($styles, 'font-weight');
|
|
36
|
+
}
|
|
37
|
+
|
|
47
38
|
@mixin typescale($role) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
$t: '--#{base.$prefix}-sys-typescale-#{$role}';
|
|
40
|
+
font-family: var(#{$t}-font);
|
|
41
|
+
font-size: var(#{$t}-font-size);
|
|
42
|
+
line-height: var(#{$t}-line-height);
|
|
43
|
+
letter-spacing: var(#{$t}-letter-spacing);
|
|
44
|
+
font-weight: var(#{$t}-font-weight);
|
|
54
45
|
}
|
|
55
46
|
|
|
56
|
-
// State Layers
|
|
57
47
|
@mixin state-layer($color, $state: 'hover', $selector: false) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// The ripple is the press (as Compose draws it: one pressed indication at
|
|
70
|
-
// 0.10). An element that carries a ripple leaves its pressed layer to the wave, so
|
|
71
|
-
// the two no longer add up to about 0.18; one without a ripple keeps it.
|
|
72
|
-
@if $state == 'pressed' {
|
|
73
|
-
&:not(:has(> .#{base.$prefix}-ripple)) {
|
|
74
|
-
@include -state-layer-surface($color, $state, $selector);
|
|
75
|
-
}
|
|
76
|
-
} @else {
|
|
77
|
-
@include -state-layer-surface($color, $state, $selector);
|
|
78
|
-
}
|
|
48
|
+
@at-root :where(&) {
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@if $state == 'pressed' {
|
|
53
|
+
&:not(:has(> .#{base.$prefix}-ripple)) {
|
|
54
|
+
@include -state-layer-surface($color, $state, $selector);
|
|
55
|
+
}
|
|
56
|
+
} @else {
|
|
57
|
+
@include -state-layer-surface($color, $state, $selector);
|
|
58
|
+
}
|
|
79
59
|
}
|
|
80
60
|
|
|
81
61
|
@mixin -state-layer-surface($color, $state, $selector) {
|
|
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
|
-
// Elevation
|
|
62
|
+
@if $selector == false {
|
|
63
|
+
&::before {
|
|
64
|
+
content: '';
|
|
65
|
+
position: absolute;
|
|
66
|
+
inset: 0;
|
|
67
|
+
background-color: $color;
|
|
68
|
+
opacity: f.get-state-opacity($state);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
border-radius: inherit;
|
|
71
|
+
}
|
|
72
|
+
} @else {
|
|
73
|
+
#{$selector} {
|
|
74
|
+
content: '';
|
|
75
|
+
position: absolute;
|
|
76
|
+
inset: 0;
|
|
77
|
+
background-color: $color;
|
|
78
|
+
opacity: f.get-state-opacity($state);
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
border-radius: inherit;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
108
85
|
@mixin elevation($level) {
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Motion
|
|
113
|
-
//
|
|
114
|
-
// One transition on an M3 Expressive spring token: `spring(transform,
|
|
115
|
-
// default-spatial)`. Spatial springs move position, size and shape and may
|
|
116
|
-
// overshoot; effects springs change opacity and colour and never do.
|
|
117
|
-
// A delay lets a property wait for another transition, such as visibility
|
|
118
|
-
// flipping to hidden only once a fade has finished.
|
|
119
|
-
// A spring on an inline inset the arms form splits across `left` and `right`
|
|
120
|
-
// names both sides there, so the move animates whichever side the direction
|
|
121
|
-
// placed it on (abstract/_emit.scss, abstract/_direction.scss).
|
|
86
|
+
box-shadow: f.get-elevation($level);
|
|
87
|
+
}
|
|
88
|
+
|
|
122
89
|
@function spring($property, $token, $delay: null) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// How long a spring token takes to settle, for delays tied to it.
|
|
90
|
+
$names: emit.transition-names($property);
|
|
91
|
+
$transitions: ();
|
|
92
|
+
@each $name in $names {
|
|
93
|
+
$transition: $name v.motion('spring-#{$token}-duration') v.motion('spring-#{$token}-easing');
|
|
94
|
+
@if $delay {
|
|
95
|
+
$transition: list.append($transition, $delay);
|
|
96
|
+
}
|
|
97
|
+
$transitions: list.append($transitions, $transition, comma);
|
|
98
|
+
}
|
|
99
|
+
@if list.length($transitions) == 1 {
|
|
100
|
+
@return list.nth($transitions, 1);
|
|
101
|
+
}
|
|
102
|
+
@return $transitions;
|
|
103
|
+
}
|
|
104
|
+
|
|
139
105
|
@function spring-duration($token) {
|
|
140
|
-
|
|
106
|
+
@return v.motion('spring-#{$token}-duration');
|
|
141
107
|
}
|
|
142
108
|
|
|
143
|
-
// Sheets that slide in on a spatial spring overshoot their resting place, so
|
|
144
|
-
// for a moment a gap would open between the sheet and the screen edge it is
|
|
145
|
-
// docked to. Compose stretches the sheet over that gap; a solid shadow of the
|
|
146
|
-
// sheet's own colour, extended past the docked edge, covers it without a scale.
|
|
147
|
-
// The spring overshoots by about 1.5% of the distance travelled.
|
|
148
109
|
$sheet-overshoot-guard: 32px;
|
|
149
110
|
|
|
150
111
|
@mixin motion-transition($properties...) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
112
|
+
$transitions: ();
|
|
113
|
+
@each $prop in $properties {
|
|
114
|
+
$transitions: list.append(
|
|
115
|
+
$transitions,
|
|
116
|
+
$prop f.get-motion-duration('short2') v.motion('easing-standard'),
|
|
117
|
+
comma
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
transition: $transitions;
|
|
160
121
|
}
|
|
161
122
|
|
|
162
123
|
@mixin motion-exit($properties...) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
124
|
+
$transitions: ();
|
|
125
|
+
@each $prop in $properties {
|
|
126
|
+
$transitions: list.append(
|
|
127
|
+
$transitions,
|
|
128
|
+
$prop f.get-motion-duration('short4') v.motion('easing-exit'),
|
|
129
|
+
comma
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
transition: $transitions;
|
|
172
133
|
}
|
|
173
134
|
|
|
174
135
|
@mixin motion-enter($properties...) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// New mixins for specific animation behaviors
|
|
136
|
+
$transitions: ();
|
|
137
|
+
@each $prop in $properties {
|
|
138
|
+
$transitions: list.append(
|
|
139
|
+
$transitions,
|
|
140
|
+
$prop f.get-motion-duration('short4') v.motion('easing-enter'),
|
|
141
|
+
comma
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
transition: $transitions;
|
|
145
|
+
}
|
|
146
|
+
|
|
187
147
|
@mixin motion-appear($properties...) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
148
|
+
$transitions: ();
|
|
149
|
+
@each $prop in $properties {
|
|
150
|
+
$transitions: list.append(
|
|
151
|
+
$transitions,
|
|
152
|
+
$prop f.get-motion-duration('short3') v.motion('easing-appear'),
|
|
153
|
+
comma
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
transition: $transitions;
|
|
197
157
|
}
|
|
198
158
|
|
|
199
159
|
@mixin motion-disappear($properties...) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
160
|
+
$transitions: ();
|
|
161
|
+
@each $prop in $properties {
|
|
162
|
+
$transitions: list.append(
|
|
163
|
+
$transitions,
|
|
164
|
+
$prop f.get-motion-duration('short2') v.motion('easing-disappear'),
|
|
165
|
+
comma
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
transition: $transitions;
|
|
209
169
|
}
|
|
210
170
|
|
|
211
171
|
@mixin motion-expand($properties...) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
172
|
+
$transitions: ();
|
|
173
|
+
@each $prop in $properties {
|
|
174
|
+
$transitions: list.append(
|
|
175
|
+
$transitions,
|
|
176
|
+
$prop f.get-motion-duration('short4') v.motion('easing-expand'),
|
|
177
|
+
comma
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
transition: $transitions;
|
|
221
181
|
}
|
|
222
182
|
|
|
223
183
|
@mixin motion-collapse($properties...) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Focus Ring
|
|
184
|
+
$transitions: ();
|
|
185
|
+
@each $prop in $properties {
|
|
186
|
+
$transitions: list.append(
|
|
187
|
+
$transitions,
|
|
188
|
+
$prop f.get-motion-duration('short3') v.motion('easing-collapse'),
|
|
189
|
+
comma
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
transition: $transitions;
|
|
193
|
+
}
|
|
194
|
+
|
|
236
195
|
@mixin focus-ring($color: var(--#{v.$prefix}-sys-color-primary), $width: 2px, $offset: 2px) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
196
|
+
&:focus-visible {
|
|
197
|
+
outline: $width solid $color;
|
|
198
|
+
outline-offset: $offset;
|
|
199
|
+
@include elevation(1);
|
|
200
|
+
}
|
|
242
201
|
}
|
|
243
202
|
|
|
244
|
-
// Interactive States
|
|
245
203
|
@mixin interactive-states($config: ()) {
|
|
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
|
-
// Layout
|
|
204
|
+
$default-config: (
|
|
205
|
+
base-color: var(--#{v.$prefix}-sys-color-primary),
|
|
206
|
+
hover-state: true,
|
|
207
|
+
focus-state: true,
|
|
208
|
+
active-state: true,
|
|
209
|
+
disabled-state: true,
|
|
210
|
+
disabled-opacity: 0.38
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
$config: map.merge($default-config, $config);
|
|
214
|
+
|
|
215
|
+
@if map.get($config, hover-state) {
|
|
216
|
+
&:hover {
|
|
217
|
+
@include state-layer(map.get($config, base-color), 'hover');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@if map.get($config, focus-state) {
|
|
222
|
+
&:focus {
|
|
223
|
+
@include state-layer(map.get($config, base-color), 'focus');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@if map.get($config, active-state) {
|
|
228
|
+
&:active {
|
|
229
|
+
@include state-layer(map.get($config, base-color), 'pressed');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@if map.get($config, disabled-state) {
|
|
234
|
+
&:disabled {
|
|
235
|
+
opacity: map.get($config, disabled-opacity);
|
|
236
|
+
pointer-events: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
284
241
|
@mixin flex-center {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
288
245
|
}
|
|
289
246
|
|
|
290
247
|
@mixin center-content {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
248
|
+
position: absolute;
|
|
249
|
+
top: 50%;
|
|
250
|
+
left: 50%;
|
|
251
|
+
transform: translate(-50%, -50%);
|
|
295
252
|
}
|
|
296
253
|
|
|
297
254
|
@mixin container($max-width: 1200px, $padding: 24px) {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
255
|
+
width: 100%;
|
|
256
|
+
max-width: $max-width;
|
|
257
|
+
margin-inline: auto;
|
|
258
|
+
padding-inline: $padding;
|
|
302
259
|
}
|
|
303
260
|
|
|
304
|
-
// Text
|
|
305
261
|
@mixin truncate($lines: 1) {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Shape
|
|
262
|
+
@if $lines == 1 {
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
white-space: nowrap;
|
|
266
|
+
} @else {
|
|
267
|
+
display: -webkit-box;
|
|
268
|
+
-webkit-line-clamp: $lines;
|
|
269
|
+
-webkit-box-orient: vertical;
|
|
270
|
+
overflow: hidden;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
319
274
|
@mixin shape($size) {
|
|
320
|
-
|
|
275
|
+
border-radius: f.get-shape($size);
|
|
321
276
|
}
|
|
322
277
|
|
|
323
|
-
// Media Queries
|
|
324
278
|
@mixin breakpoint-up($size) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
279
|
+
@media (min-width: f.get-breakpoint($size)) {
|
|
280
|
+
@content;
|
|
281
|
+
}
|
|
328
282
|
}
|
|
329
283
|
|
|
330
284
|
@mixin breakpoint-down($size) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
285
|
+
@media (max-width: f.get-breakpoint($size) - 1) {
|
|
286
|
+
@content;
|
|
287
|
+
}
|
|
334
288
|
}
|
|
335
289
|
|
|
336
290
|
@mixin breakpoint-between($min, $max) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
291
|
+
@media (min-width: f.get-breakpoint($min)) and (max-width: f.get-breakpoint($max) - 1) {
|
|
292
|
+
@content;
|
|
293
|
+
}
|
|
340
294
|
}
|
|
341
295
|
|
|
342
|
-
// A11y
|
|
343
296
|
@mixin visually-hidden {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
297
|
+
position: absolute;
|
|
298
|
+
width: 1px;
|
|
299
|
+
height: 1px;
|
|
300
|
+
padding: 0;
|
|
301
|
+
margin: -1px;
|
|
302
|
+
overflow: hidden;
|
|
303
|
+
clip: rect(0, 0, 0, 0);
|
|
304
|
+
white-space: nowrap;
|
|
305
|
+
border: 0;
|
|
353
306
|
}
|
|
354
307
|
|
|
355
308
|
@mixin reduced-motion {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
309
|
+
@media (prefers-reduced-motion: reduce) {
|
|
310
|
+
@content;
|
|
311
|
+
}
|
|
359
312
|
}
|
|
360
313
|
|
|
361
|
-
// The page-wide switch, not a slot: movement stops, fades stay, and anything
|
|
362
|
-
// that moves changes at once. The reset includes it in place; the opt-in
|
|
363
|
-
// `material/styles/base-lite` emits it on its own, because that sheet drops the
|
|
364
|
-
// rest of the reset and the switch is not optional.
|
|
365
314
|
@mixin global-reduced-motion {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
315
|
+
@media (prefers-reduced-motion: reduce) {
|
|
316
|
+
html:focus-within {
|
|
317
|
+
scroll-behavior: auto;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
*,
|
|
321
|
+
*::before,
|
|
322
|
+
*::after {
|
|
323
|
+
animation-duration: 0.01ms !important;
|
|
324
|
+
animation-iteration-count: 1 !important;
|
|
325
|
+
transition-property: opacity, color, background-color, border-color, outline-color, box-shadow, visibility !important;
|
|
326
|
+
scroll-behavior: auto !important;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
380
329
|
}
|
|
381
330
|
|
|
382
331
|
@mixin high-contrast {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
// RTL Support
|
|
389
|
-
//
|
|
390
|
-
// Three forms, because the rule has to reach where it is written and resolve
|
|
391
|
-
// the direction the way the element does: the NEAREST `[dir]`, as `:dir()`
|
|
392
|
-
// carries it. An attribute selector cannot say "nearest" — `[dir='rtl'] &`
|
|
393
|
-
// matches any right-to-left ancestor, so markup in a `dir="ltr"` subtree of an
|
|
394
|
-
// RTL page mirrored by the page root. The roots the library manages carry the
|
|
395
|
-
// direction they resolved as a class (src/core/dom/direction.ts):
|
|
396
|
-
//
|
|
397
|
-
// - `:where(.mtrl-rtl) &` for a factory's markup, which is light DOM: its root
|
|
398
|
-
// carries the class, and the part is its descendant;
|
|
399
|
-
// - `:where(:host(.mtrl-rtl)) &` for a part inside a shadow root, where no
|
|
400
|
-
// ancestor is `[dir='rtl']` and `:host()` is the only way in; it matches
|
|
401
|
-
// nothing in the light DOM, so it is inert there.
|
|
402
|
-
//
|
|
403
|
-
// `[dir='rtl'] &` stays for markup the runtime does not manage (hand-written
|
|
404
|
-
// classes, server output before hydration). A root that resolved its nearest
|
|
405
|
-
// direction left-to-right carries `mtrl-ltr`, and its subtree is cut from
|
|
406
|
-
// every arm — the class arms and the attribute arm alike: a nearer boundary
|
|
407
|
-
// wins whether the ancestor above it is marked by the runtime's class or by
|
|
408
|
-
// `dir`. `:where()` keeps
|
|
409
|
-
// the classes and the cut out of the specificity, as an attribute on an
|
|
410
|
-
// ancestor was: the rule replaces the physical rule it mirrors, and a state
|
|
411
|
-
// rule more specific than that physical rule still wins (a drawer's open
|
|
412
|
-
// transform over its closed position). `:dir()` itself stays out of the sheet:
|
|
413
|
-
// consumer bundlers lower it into `:lang()` lists that match no `dir`
|
|
414
|
-
// (src/styles/components/_text-field.scss).
|
|
415
|
-
// A component factory rendered inside a shadow root the app owns needs the
|
|
416
|
-
// direction set in the app's own stylesheet, or the class on that root.
|
|
417
|
-
// A rule inside the block adds to the part with a compound (`&.x`,
|
|
418
|
-
// `&:hover`), never a suffix: a suffix (`&__x`) cannot follow the guard's
|
|
419
|
-
// `:not()`. A rule whose subject is a BEM element or a variant class goes
|
|
420
|
-
// through `rtl-selector` instead, which writes the subject out.
|
|
421
|
-
//
|
|
422
|
-
// `$self: true` for a value the include site sets on itself (a factory's root):
|
|
423
|
-
// its reflected class or its own `dir` matches, the nearest boundary, uncut.
|
|
332
|
+
@media (forced-colors: active) {
|
|
333
|
+
@content;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
424
337
|
@mixin rtl($self: false) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
338
|
+
$cut: ":not(:where(.#{base.$prefix}-ltr, .#{base.$prefix}-ltr *))";
|
|
339
|
+
$arms: ":where(.#{base.$prefix}-rtl) &#{$cut}, :where(:host(.#{base.$prefix}-rtl)) &#{$cut}, [dir='rtl'] &#{$cut}";
|
|
340
|
+
@if $self { $arms: "&:where(.#{base.$prefix}-rtl, [dir='rtl']), #{$arms}"; }
|
|
341
|
+
#{$arms} { @content; }
|
|
429
342
|
}
|
|
430
343
|
|
|
431
|
-
// The same three arms for a subject that is not the include site's selector
|
|
432
|
-
// extended: a BEM element or a variant class, which a suffix on `&` would
|
|
433
|
-
// replace the subject with and the guard sits on the wrong compound for.
|
|
434
|
-
// `$subject` is the class at the call site (e.g. `".#{$component}__item"`).
|
|
435
|
-
// The cut rides the subject on all three, as `rtl()` writes it.
|
|
436
344
|
@mixin rtl-selector($subject) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
345
|
+
$cut: ":not(:where(.#{base.$prefix}-ltr, .#{base.$prefix}-ltr *))";
|
|
346
|
+
@at-root {
|
|
347
|
+
:where(.#{base.$prefix}-rtl) #{$subject}#{$cut},
|
|
348
|
+
:where(:host(.#{base.$prefix}-rtl)) #{$subject}#{$cut},
|
|
349
|
+
[dir='rtl'] #{$subject}#{$cut} {
|
|
350
|
+
@content;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
445
353
|
}
|
|
446
354
|
|
|
447
355
|
@mixin touch-target($size: 48px) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
@media (forced-colors: active) {
|
|
472
|
-
@content;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// Scrollbars
|
|
356
|
+
position: relative;
|
|
357
|
+
|
|
358
|
+
&::after {
|
|
359
|
+
content: '';
|
|
360
|
+
position: absolute;
|
|
361
|
+
top: 50%;
|
|
362
|
+
left: 50%;
|
|
363
|
+
width: $size;
|
|
364
|
+
height: $size;
|
|
365
|
+
transform: translate(-50%, -50%);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@media (prefers-reduced-motion: reduce) {
|
|
369
|
+
@content;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@media (forced-colors: active) {
|
|
373
|
+
@content;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
477
377
|
@mixin custom-scrollbar($config: ()) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
// Scrollbar mixin for consistent styling across components
|
|
378
|
+
$default-config: (
|
|
379
|
+
width: 8px,
|
|
380
|
+
track-color: transparent,
|
|
381
|
+
thumb-color: rgba(0, 0, 0, 0.2),
|
|
382
|
+
thumb-hover-color: rgba(0, 0, 0, 0.3)
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
$config: map.merge($default-config, $config);
|
|
386
|
+
|
|
387
|
+
&::-webkit-scrollbar {
|
|
388
|
+
width: map.get($config, width);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
&::-webkit-scrollbar-track {
|
|
392
|
+
background: map.get($config, track-color);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
&::-webkit-scrollbar-thumb {
|
|
396
|
+
background: map.get($config, thumb-color);
|
|
397
|
+
border-radius: f.get-shape('full');
|
|
398
|
+
|
|
399
|
+
&:hover {
|
|
400
|
+
background: map.get($config, thumb-hover-color);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
|
|
507
406
|
@mixin scrollbar(
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
407
|
+
$width: 8px,
|
|
408
|
+
$track-color: rgba(0, 0, 0, 0.05),
|
|
409
|
+
$thumb-color: rgba(0, 0, 0, 0.2)
|
|
511
410
|
) {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
// Flexbox layout mixins
|
|
411
|
+
&::-webkit-scrollbar {
|
|
412
|
+
width: $width;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
&::-webkit-scrollbar-track {
|
|
416
|
+
background: $track-color;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
&::-webkit-scrollbar-thumb {
|
|
420
|
+
background: $thumb-color;
|
|
421
|
+
border-radius: math.div($width, 2);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
scrollbar-width: thin;
|
|
425
|
+
scrollbar-color: $thumb-color $track-color;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
532
429
|
@mixin flex-row($align: center, $justify: flex-start, $gap: 0) {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
430
|
+
display: flex;
|
|
431
|
+
flex-direction: row;
|
|
432
|
+
align-items: $align;
|
|
433
|
+
justify-content: $justify;
|
|
434
|
+
@if $gap > 0 {
|
|
435
|
+
gap: $gap;
|
|
436
|
+
}
|
|
540
437
|
}
|
|
541
438
|
|
|
542
439
|
@mixin flex-column($align: flex-start, $justify: flex-start, $gap: 0) {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
440
|
+
display: flex;
|
|
441
|
+
flex-direction: column;
|
|
442
|
+
align-items: $align;
|
|
443
|
+
justify-content: $justify;
|
|
444
|
+
@if $gap > 0 {
|
|
445
|
+
gap: $gap;
|
|
446
|
+
}
|
|
550
447
|
}
|
|
551
448
|
|
|
552
|
-
// Print
|
|
553
449
|
@mixin print {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
450
|
+
@media print {
|
|
451
|
+
@content;
|
|
452
|
+
}
|
|
557
453
|
}
|