-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathradiobutton.scss
More file actions
50 lines (41 loc) · 1.34 KB
/
radiobutton.scss
File metadata and controls
50 lines (41 loc) · 1.34 KB
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
// Checkbox need to be imported before, we won't double it here currently
.#{$ns}-control {
--#{$eccgui}-a11y-outline-color: #{$eccgui-color-accent};
--#{$eccgui}-a11y-outline-width: 2px;
--#{$eccgui}-a11y-outline-offset: 0;
&.#{$ns}-radio {
input ~ .#{$ns}-control-indicator,
input:checked ~ .#{$ns}-control-indicator {
box-shadow: none;
}
input:focus ~ .#{$ns}-control-indicator {
@extend .focus-by-keyboard;
animation: none;
}
input:disabled ~ .#{$ns}-control-indicator,
input:disabled:checked ~ .#{$ns}-control-indicator {
background-color: $eccgui-color-checkbox-background;
opacity: 1;
&::before {
opacity: 0.25;
}
}
input ~ .#{$ns}-control-indicator::before {
background-image: url("~@carbon/icons/svg/32/radio-button.svg");
}
input:checked ~ .#{$ns}-control-indicator::before {
background-image: url("~@carbon/icons/svg/32/radio-button--checked.svg");
}
}
}
.#{$eccgui}-radiobutton--hidden-indicator {
&:not(.#{$ns}-align-right) {
padding-inline-start: 0;
}
&:not(.#{$ns}-align-left) {
padding-inline-end: 0;
}
input ~ .#{$ns}-control-indicator {
visibility: hidden;
}
}