forked from deathau/obsidian-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
realistic-highlight.css
66 lines (62 loc) · 2.18 KB
/
realistic-highlight.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
body{
--fluro-yellow-rgb: 255, 255, 0;
--fluro-pink-rgb: 255, 0, 255;
--fluro-blue-rgb: 0, 255, 255;
--fluro-green-rgb: 0, 255, 0;
--text-highlight-rgb: var(--fluro-yellow-rgb);
}
mark.yellow{ --text-highlight-rgb: var(--fluro-yellow-rgb); }
mark.pink{ --text-highlight-rgb: var(--fluro-pink-rgb); }
mark.blue{ --text-highlight-rgb: var(--fluro-blue-rgb); }
mark.green{ --text-highlight-rgb: var(--fluro-green-rgb); }
.markdown-preview-view mark {
margin: 0 -0.4em;
padding: 0.1em 0.4em;
border-radius: 0.8em 0.3em;
background: transparent;
background-image: linear-gradient(105deg,
transparent 0,
transparent 0.3em,
rgba(var(--text-highlight-rgb), 0.7) 0.5em,
rgba(var(--text-highlight-rgb), 0.4) 1.6em,
rgba(var(--text-highlight-rgb), 0.4) calc(100% - 1.4em),
rgba(var(--text-highlight-rgb), 0.7) calc(100% - 0.5em),
transparent calc(100% - 0.3em),
transparent 100%);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
text-shadow: 0 0 0.75em var(--background-primary-alt);
}
.cm-s-obsidian span.cm-highlight {
padding:0.1em 0;
background: rgba(var(--text-highlight-rgb), 0.4);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
text-shadow: 0 0 0.75em var(--background-primary-alt);
}
.cm-s-obsidian span.cm-formatting-highlight{
margin: 0 0 0 -0.4em;
padding: 0.1em 0 0.1em 0.4em;
border-radius: 0.8em 0 0 0.4em;
background: none;
background-image: linear-gradient(105deg,
transparent 0,
transparent 0.3em,
rgba(var(--text-highlight-rgb), 0.7) 0.5em,
rgba(var(--text-highlight-rgb), 0.4) 1.6em);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cm-s-obsidian .cm-highlight+span.cm-formatting-highlight {
margin: 0 -0.4em 0 0;
padding: 0.1em 0.4em 0.1em 0;
border-radius: 0 0.4em 0.8em 0;
background: none;
background-image: linear-gradient(105deg,
rgba(var(--text-highlight-rgb), 0.4) calc(100% - 1.4em),
rgba(var(--text-highlight-rgb), 0.7) calc(100% - 0.5em),
transparent calc(100% - 0.3em),
transparent 100%);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}