forked from deathau/obsidian-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbox.css
102 lines (93 loc) · 3.47 KB
/
checkbox.css
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* Notation checkboxes */
.markdown-preview-view .task-list-item-checkbox {
-webkit-appearance: none;
box-sizing: border-box;
border: 1px solid var(--text-normal);
position: relative;
width: 16px;
height: 16px;
margin: 0;
margin-right: 4px;
margin-bottom: 2px;
transition: background-color 200ms ease-out 0s;
cursor: pointer;
filter: none;
border-radius: 4px;
}
.markdown-preview-view .task-list-item-checkbox:checked {
border: none;
background-color: var(--interactive-accent);
}
.markdown-preview-view .task-list-item-checkbox:hover {
background-color: var(--background-primary-alt);
}
.markdown-preview-view .task-list-item-checkbox:checked::before {
position: absolute;
color: white;
text-align: center;
font-weight: 900;
line-height: 15px;
width:12px;
left:2px;
right:2px;
}
.markdown-preview-view ul>li.task-list-item {
font-weight: normal;
color: var(--text-normal);
}
/* SVG check mark for done ('- [x]') */
.markdown-preview-view li[data-task="x"]>.task-list-item-checkbox:checked::before,
.markdown-preview-view li[data-task="X"]>.task-list-item-checkbox:checked::before {
content: ' ';
top: 2px;
bottom: 2px;
background-color: white;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpolygon points='5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039'%3E%3C/polygon%3E%3C/svg%3E");
}
/* SVG chevron right for deferred/scheduled ('- [>]') */
.markdown-preview-view li[data-task=">"]>.task-list-item-checkbox:checked::before {
content: '';
top:2px;
bottom:2px;
background-color: white;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.12 7L3.26667 11.76L4.57333 13.0667L10.7333 7L4.57333 0.933332L3.26667 2.24L8.12 7Z'/%3E%3C/svg%3E");
}
/* SVG line for cancelled/non-task ('- [-]') */
.markdown-preview-view li[data-task="-"]>.task-list-item-checkbox:checked::before {
content: '';
top:2px;
bottom:2px;
background-color: white;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' y='6.5' width='13' height='1'/%3E%3C/svg%3E");
}
/* greyed-out background colour for cancelled/non-task ('- [-]') */
.markdown-preview-view li[data-task="-"]>.task-list-item-checkbox:checked {
background-color: var(--text-faint);
}
/* '?' for question/more info task ('- [?]') */
.markdown-preview-view li[data-task="?"]>.task-list-item-checkbox:checked::before {
content: '?';
}
/* text style for question/more info task ('- [?]') */
.markdown-preview-view ul>li[data-task="?"].task-list-item.is-checked {
color: var(--text-normal);
text-decoration: none;
}
/* yellow background colour for question/more info task ('- [?]') */
.markdown-preview-view li[data-task="?"]>.task-list-item-checkbox:checked{
background-color: #A99400;
}
/* '!' for important task ('- [!]') */
.markdown-preview-view li[data-task="!"]>.task-list-item-checkbox:checked::before {
content: '!';
}
/* text style for important task ('- [!]') */
.markdown-preview-view ul>li[data-task="!"].task-list-item.is-checked {
color: var(--text-normal);
text-decoration: none;
font-weight: 900;
}
/* red background colour for important task ('- [!]') */
.markdown-preview-view li[data-task="!"]>.task-list-item-checkbox:checked {
background-color: #a90000;
}