-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathChecklist.css
More file actions
79 lines (67 loc) · 1.6 KB
/
Copy pathChecklist.css
File metadata and controls
79 lines (67 loc) · 1.6 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.checklist {
margin-top: -0.25rem;
--color-text-muted: #9ca3af;
}
:root:not([data-vocs-theme='dark']) .checklist {
--color-text-muted: #6b7280;
}
.checklist ul {
list-style: none !important;
padding-left: 0;
margin: 0.25em 0;
}
.checklist ul ul {
list-style: none !important;
padding-left: 1.25rem;
margin: 0;
}
.checklist li {
position: relative;
padding-left: 26px;
margin: 4px 0;
line-height: 1.5;
}
/* Non-checkbox items: show a bullet and reduce left indent */
.checklist li:not(:has(> input[type="checkbox"])) {
padding-left: 1rem;
}
.checklist li:not(:has(> input[type="checkbox"]))::before {
content: "•";
position: absolute;
left: 0;
top: 0;
}
/* Non-checkbox nested items: tighter spacing */
.checklist ul ul li:not(:has(input[type="checkbox"])) {
margin: 1px 0;
}
.checklist li input[type="checkbox"] {
position: absolute;
left: 0;
top: 4px;
width: 16px;
height: 16px;
margin: 0;
cursor: pointer;
accent-color: var(--color-primary, #4339db);
}
/* Strike through and mute a checked item, but reset both on its nested list so
the strikethrough never carries into sub-items. */
.checklist li.is-checked {
text-decoration: line-through;
color: var(--color-text-muted);
}
.checklist li.is-checked > ul,
.checklist li.is-checked > ol {
text-decoration: none;
color: var(--vocs-text-color-primary, currentColor);
}
/* Tighten paragraph wrappers that loose lists add around item text. */
.checklist li p {
margin: 0;
}
/* When a checklist follows a list item label, indent to match list depth. */
ul + .checklist,
ol + .checklist {
padding-left: 1.25rem;
}