-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
styles.ts
57 lines (50 loc) · 1.36 KB
/
styles.ts
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
import { css } from 'lit'
export default css`
label {
display: flex;
align-items: center;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
column-gap: var(--wui-spacing-1xs);
}
label > input[type='checkbox'] {
height: 0;
width: 0;
opacity: 0;
pointer-events: none;
position: absolute;
}
label > span {
width: var(--wui-spacing-xl);
height: var(--wui-spacing-xl);
min-width: var(--wui-spacing-xl);
min-height: var(--wui-spacing-xl);
border-radius: var(--wui-border-radius-3xs);
border-width: 1px;
border-style: solid;
border-color: var(--wui-color-gray-glass-010);
display: flex;
align-items: center;
justify-content: center;
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
will-change: background-color;
}
label > span:hover,
label > input[type='checkbox']:focus-visible + span {
background-color: var(--wui-color-gray-glass-010);
}
label input[type='checkbox']:checked + span {
background-color: var(--wui-color-blue-base-90);
}
label > span > wui-icon {
opacity: 0;
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-lg);
will-change: opacity;
}
label > input[type='checkbox']:checked + span wui-icon {
opacity: 1;
}
`