1
+ /*------------------------------------*\
2
+ # SELECTION CHIP
3
+ \*------------------------------------*/
4
+
5
+ /**
6
+ * SelectionChip
7
+ */
8
+ .selection-chip {
9
+ display : inline-flex;
10
+ align-items : center;
11
+ gap : calc (var (--eds-size-1 ) / 16 * 1rem );
12
+
13
+ padding : calc (var (--eds-size-1 ) / 16 * 1rem ) calc (var (--eds-size-2 ) / 16 * 1rem );
14
+ border-radius : calc (var (--eds-border-radius-full ) * 1px );
15
+
16
+ color : var (--eds-theme-color-text-utility-interactive-primary );
17
+ /* TODO-AH: use token for 1px border */
18
+ border : 1px solid var (--eds-theme-color-border-utility-default-low-emphasis );
19
+ background-color : var (--eds-theme-color-background-utility-interactive-no-emphasis );
20
+ }
21
+
22
+ .selection-chip__label {
23
+ user-select : none;
24
+ -webkit-user-select : none;
25
+ -webkit-touch-callout : none;
26
+ }
27
+
28
+ .selection-chip__input {
29
+ /* TODO-AH: handle focus */
30
+ display : none;
31
+ }
32
+
33
+ /** TODO-AH: make sure spacing on right is 20px equivalent when icon present */
34
+
35
+ /**
36
+ * Color theme tokens
37
+ */
38
+
39
+ .selection-chip : hover {
40
+ background-color : var (--eds-theme-color-background-utility-default-no-emphasis-hover );
41
+ }
42
+
43
+ .selection-chip : active {
44
+ background-color : var (--eds-theme-color-background-utility-default-no-emphasis-active );
45
+ }
46
+
47
+ .selection-chip : has (.selection-chip__input : checked ) {
48
+ /* TODO-AH: use token for 2px border */
49
+ border : 1px solid var (--eds-theme-color-border-utility-interactive );
50
+ box-shadow : inset 0 0 0 1px var (--eds-theme-color-border-utility-interactive );
51
+ background-color : var (--eds-theme-color-background-utility-interactive-low-emphasis );
52
+ }
53
+
54
+ .selection-chip : has (.selection-chip__input : checked ): hover {
55
+ border-color : var (--eds-theme-color-border-utility-interactive-hover );
56
+ background-color : var (--eds-theme-color-background-utility-interactive-low-emphasis-hover );
57
+ }
58
+
59
+ .selection-chip : has (.selection-chip__input : checked ): active {
60
+ border-color : var (--eds-theme-color-border-utility-interactive-active );
61
+ background-color : var (--eds-theme-color-background-utility-interactive-low-emphasis-active );
62
+ }
63
+
64
+ /** TODO-AH: add in selected border color. Also confirm how focus ring spacing should work */
0 commit comments