-
Notifications
You must be signed in to change notification settings - Fork 0
/
shiki.css
101 lines (87 loc) · 2.35 KB
/
shiki.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
/**
* Custom shiki code block theme
* reference: https://github.com/shikijs/shiki/blob/main/docs/themes.md
* -------------------------------------------------------------------------- */
:root {
--shiki-color-text: #414141;
--shiki-color-background: transparent;
--shiki-token-constant: #1976d2;
--shiki-token-string: #31a94d;
--shiki-token-comment: rgb(182, 180, 180);
--shiki-token-keyword: #cf2727;
--shiki-token-parameter: #f59403;
--shiki-token-function: #7041c8;
--shiki-token-string-expression: #218438;
--shiki-token-punctuation: #242323;
--shiki-token-link: #22863a;
}
.dark {
--shiki-color-text: #cac7c7;
--shiki-token-constant: #6fb0fa;
--shiki-token-string: #f9a86e;
--shiki-token-comment: #6a727b;
--shiki-token-keyword: #f47481;
--shiki-token-parameter: #ff9800;
--shiki-token-function: #ae8eeb;
--shiki-token-string-expression: #4fb74d;
--shiki-token-punctuation: #bbbbbb;
--shiki-token-link: #f9a76d;
}
.diff,
.code-line-highlighted {
transition: background-color 0.5s;
margin: 0 -20px;
padding: 0 20px;
width: calc(100% + 40px);
display: inline-block;
position: relative;
}
div[class*='language-'] code .diff.remove {
background-color: rgba(244, 63, 94, 0.16);
}
.diff.add::after {
content: '+';
position: absolute;
left: 10px;
color: #3dd68c;
}
.diff.remove::after {
content: '-';
position: absolute;
left: 10px;
color: #cb7676;
}
.has-diff div[class*='language-'] .diff.add {
background-color: rgba(16, 185, 129, 0.16);
}
.has-highlight div[class*='language-'] .line.highlighted {
background-color: rgba(101, 117, 133, 0.16);
}
.has-highlight div[class*='language-'] .line.highlighted.error {
background-color: rgba(244, 63, 94, 0.16);
}
.has-highlight div[class*='language-'] .line.highlighted.warning {
background-color: rgba(234, 179, 8, 0.16);
}
.has-focused div[class*='language-'] .line:not(.focused) {
filter: blur(0.095rem);
opacity: 0.4;
transition: filter 0.35s, opacity 0.35s;
}
.has-focused:hover div[class*='language-'] .line:not(.focused) {
filter: blur(0);
opacity: 1;
}
.has-line-number code {
counter-reset: step;
counter-increment: step 0;
}
.has-line-number code .line-number::before {
content: counter(step);
counter-increment: step;
width: 15px;
margin-right: 15px;
display: inline-block;
text-align: right;
color: rgba(115,138,148,.4)
}