-
Notifications
You must be signed in to change notification settings - Fork 939
/
Copy path_md-comp-slider.scss
117 lines (110 loc) · 3.27 KB
/
_md-comp-slider.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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
108
109
110
111
112
113
114
115
116
117
//
// Copyright 2023 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
// go/keep-sorted start
@use 'sass:map';
// go/keep-sorted end
// go/keep-sorted start
@use './internal/validate';
@use './md-sys-color';
@use './md-sys-elevation';
@use './md-sys-shape';
@use './md-sys-state';
@use './md-sys-typescale';
@use './v0_192/md-comp-slider';
// go/keep-sorted end
$supported-tokens: (
// go/keep-sorted start
'active-track-color',
'active-track-height',
'active-track-shape',
'disabled-active-track-color',
'disabled-active-track-opacity',
'disabled-handle-color',
'disabled-handle-elevation',
'disabled-inactive-track-color',
'disabled-inactive-track-opacity',
'focus-handle-color',
'handle-color',
'handle-elevation',
'handle-height',
'handle-shadow-color',
'handle-shape',
'handle-width',
'hover-handle-color',
'hover-state-layer-color',
'hover-state-layer-opacity',
'inactive-track-color',
'inactive-track-height',
'inactive-track-shape',
'label-container-color',
'label-container-height',
'label-text-color',
'label-text-font',
'label-text-line-height',
'label-text-size',
'label-text-weight',
'pressed-handle-color',
'pressed-state-layer-color',
'pressed-state-layer-opacity',
'state-layer-size',
'with-overlap-handle-outline-color',
'with-overlap-handle-outline-width',
'with-tick-marks-active-container-color',
'with-tick-marks-container-size',
'with-tick-marks-disabled-container-color',
'with-tick-marks-inactive-container-color',
// go/keep-sorted end
);
$unsupported-tokens: (
'disabled-handle-opacity',
'label-container-elevation',
'label-text-type',
'label-text-tracking',
'track-elevation',
// for efficiency, tick marks are rendered as radial-gradients and
// have more limited customization
'with-tick-marks-container-shape',
// Due to how opacity is multiplied together in the browser, using
// these tokens results in low contrast tick marks.
'with-tick-marks-active-container-opacity',
'with-tick-marks-disabled-container-opacity',
'with-tick-marks-inactive-container-opacity',
// focus tokens no longer used.
'focus-state-layer-color',
'focus-state-layer-opacity'
);
$_default: (
'md-sys-color': md-sys-color.values-light(),
'md-sys-elevation': md-sys-elevation.values(),
'md-sys-shape': md-sys-shape.values(),
'md-sys-state': md-sys-state.values(),
'md-sys-typescale': md-sys-typescale.values(),
);
@function values(
$deps: $_default,
$exclude-hardcoded-values: false,
$exclude-custom-properties: false
) {
$tokens: validate.values(
md-comp-slider.values($deps, $exclude-hardcoded-values),
$supported-tokens: $supported-tokens,
$unsupported-tokens: $unsupported-tokens,
$renamed-tokens: (
'label-label-text-color': 'label-text-color',
'label-label-text-type': 'label-text-type',
'label-label-text-font': 'label-text-font',
'label-label-text-line-height': 'label-text-line-height',
'label-label-text-size': 'label-text-size',
'label-label-text-tracking': 'label-text-tracking',
'label-label-text-weight': 'label-text-weight',
)
);
@if not $exclude-custom-properties {
@each $token, $value in $tokens {
$tokens: map.set($tokens, $token, var(--md-slider-#{$token}, #{$value}));
}
}
@return $tokens;
}