Checkbox.module.css
900 Bytes
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
.label {
display: inline-flex;
align-items: center;
gap: var(--gl-spacing-sm);
color: var(--gl-color-text-primary);
font-size: var(--gl-font-size-sm);
line-height: var(--gl-line-height-sm);
cursor: pointer;
}
.labelDisabled {
cursor: not-allowed;
opacity: 0.55;
}
.box {
display: inline-grid;
width: 16px;
height: 16px;
flex: 0 0 16px;
place-items: center;
border: 1px solid var(--gl-color-border-primary);
border-radius: 2px;
background: var(--gl-color-bg-container);
color: #fff;
transition:
background-color 120ms ease,
border-color 120ms ease;
}
.input {
position: absolute;
opacity: 0;
}
.input:focus-visible + .box {
outline: 2px solid color-mix(in srgb, var(--gl-color-primary) 22%, transparent);
outline-offset: 2px;
}
.input:checked + .box,
.mixed {
border-color: var(--gl-color-primary);
background: var(--gl-color-primary);
}