-
Notifications
You must be signed in to change notification settings - Fork 909
/
Copy path_md-comp-icon-button.scss
94 lines (87 loc) · 2.6 KB
/
_md-comp-icon-button.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
//
// 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-shape';
@use './md-sys-state';
@use './v0_192/md-comp-icon-button';
// go/keep-sorted end
$supported-tokens: (
// go/keep-sorted start
'disabled-icon-color',
'disabled-icon-opacity',
'focus-icon-color',
'hover-icon-color',
'hover-state-layer-color',
'hover-state-layer-opacity',
'icon-color',
'icon-size',
'pressed-icon-color',
'pressed-state-layer-color',
'pressed-state-layer-opacity',
'selected-focus-icon-color',
'selected-hover-icon-color',
'selected-hover-state-layer-color',
'selected-hover-state-layer-opacity',
'selected-icon-color',
'selected-pressed-icon-color',
'selected-pressed-state-layer-color',
'selected-pressed-state-layer-opacity',
'state-layer-height',
'state-layer-shape',
'state-layer-width',
// go/keep-sorted end
);
$unsupported-tokens: (
// go/keep-sorted start
'focus-state-layer-color',
'focus-state-layer-opacity',
'selected-focus-state-layer-color',
'selected-focus-state-layer-opacity',
// go/keep-sorted end
);
$_default: (
'md-sys-color': md-sys-color.values-light(),
'md-sys-shape': md-sys-shape.values(),
'md-sys-state': md-sys-state.values(),
);
@function values(
$deps: $_default,
$exclude-hardcoded-values: false,
$exclude-custom-properties: false
) {
$tokens: validate.values(
md-comp-icon-button.values($deps, $exclude-hardcoded-values),
$supported-tokens: $supported-tokens,
$unsupported-tokens: $unsupported-tokens,
$renamed-tokens: (
// Remove default "unselected" prefix (b/292244480)
'unselected-focus-icon-color': 'focus-icon-color',
'unselected-hover-icon-color': 'hover-icon-color',
'unselected-hover-state-layer-color': 'hover-state-layer-color',
'unselected-hover-state-layer-opacity': 'hover-state-layer-opacity',
'unselected-icon-color': 'icon-color',
'unselected-pressed-icon-color': 'pressed-icon-color',
'unselected-pressed-state-layer-color': 'pressed-state-layer-color',
'unselected-pressed-state-layer-opacity': 'pressed-state-layer-opacity',
'unselected-focus-state-layer-color': 'focus-state-layer-color',
'unselected-focus-state-layer-opacity': 'focus-state-layer-opacity'
)
);
@if not $exclude-custom-properties {
@each $token, $value in $tokens {
$tokens: map.set(
$tokens,
$token,
var(--md-icon-button-#{$token}, #{$value})
);
}
}
@return $tokens;
}