-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathradio.scss
67 lines (55 loc) · 1.23 KB
/
radio.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
@import "../style/base";
@import "radio-vars";
:host {
--_radio-bg: #{$radio-bg};
--_radio-color: #{$radio-color};
background: var(--_radio-bg);
color: var(--_radio-color);
width: $radio-size;
height: $radio-size;
border: $radio-border-config currentColor;
border-radius: $radio-border-radius;
transition: $radio-transition;
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
outline: none;
user-select: none;
}
:host(:not([disabled])) {
cursor: pointer;
}
:host([checked]) {
--_radio-bg: #{$radio-bg-checked};
--_radio-color: #{$radio-color-checked};
#dot {
transform: scale(1);
}
}
:host(:hover), :host(:focus) {
will-change: border, background;
#dot {
will-change: transform, background;
}
}
:host([disabled]) {
--_radio-bg: #{$radio-bg-disabled};
--_radio-color: #{$radio-color-disabled};
pointer-events: none;
}
:host([disabled][checked]) {
--_radio-bg: #{$radio-bg-disabled-checked};
--_radio-color: #{$radio-color-disabled-checked};
}
#dot {
background: currentColor;
width: $radio-dot-size;
height: $radio-dot-size;
border-radius: $radio-dot-border-radius;
transition: $radio-dot-transition;
transform: scale(0);
}
#ripple {
transform: $radio-ripple-transform;
}