-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathinline-theme-function.html
132 lines (116 loc) · 5.46 KB
/
inline-theme-function.html
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<h1>Inline Code</h1>
<p>Lorem <code>ipsum</code>, and <code class="my-inline-code abyss" data-language="css" data-index="0"><span class="mtk6">.</span><span class="mtk6">grvsc-container</span><span class="mtk1"> </span><span class="mtk1">{</span><span class="mtk1"> </span><span class="mtk15 mtki">display</span><span class="mtk1">:</span><span class="mtk1"> </span><span class="mtk15">block</span><span class="mtk1"> </span><span class="mtk1">}</span></code>.</p>
<p><code class="my-inline-code abyss" data-language="ts" data-index="1"><span class="mtk1">(</span><span class="mtk19 mtki">x</span><span class="mtk7">:</span><span class="mtk1"> </span><span class="mtk15 mtki">string</span><span class="mtk1">,</span><span class="mtk1"> </span><span class="mtk19 mtki">y</span><span class="mtk7">:</span><span class="mtk1"> </span><span class="mtk15 mtki">boolean</span><span class="mtk1">)</span><span class="mtk1"> </span><span class="mtk15 mtki">=></span><span class="mtk1"> </span><span class="mtk1">{</span><span class="mtk1">}</span></code></p>
<p><code class="my-inline-code abyss" data-language="sh" data-index="2"><span class="mtk1"> leading space should be preserved</span></code></p>
<p><code class="my-inline-code default-light grvsc-mm-tYvMB2" data-language="js" data-index="3"><span class="grvsc-t7UkM5-17 grvsc-tYvMB2-8">`</span><span class="grvsc-t7UkM5-17 grvsc-tYvMB2-8">This should be fine </span><span class="grvsc-t7UkM5-4 grvsc-tYvMB2-4">${</span><span class="grvsc-t7UkM5-12 grvsc-tYvMB2-12">because</span><span class="grvsc-t7UkM5-4 grvsc-tYvMB2-4">}</span><span class="grvsc-t7UkM5-17 grvsc-tYvMB2-8"> the Markdown parser should have already trimmed the leading space.</span><span class="grvsc-t7UkM5-17 grvsc-tYvMB2-8">`</span></code></p>
<style class="grvsc-styles">
.grvsc-container {
overflow: auto;
position: relative;
-webkit-overflow-scrolling: touch;
padding-top: 1rem;
padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));
padding-bottom: 1rem;
padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));
border-radius: 8px;
border-radius: var(--grvsc-border-radius, 8px);
font-feature-settings: normal;
line-height: 1.4;
}
.grvsc-code {
display: table;
}
.grvsc-line {
display: table-row;
box-sizing: border-box;
width: 100%;
position: relative;
}
.grvsc-line > * {
position: relative;
}
.grvsc-gutter-pad {
display: table-cell;
padding-left: 0.75rem;
padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);
}
.grvsc-gutter {
display: table-cell;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.grvsc-gutter::before {
content: attr(data-content);
}
.grvsc-source {
display: table-cell;
padding-left: 1.5rem;
padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));
padding-right: 1.5rem;
padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));
}
.grvsc-source:empty::after {
content: ' ';
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.grvsc-gutter + .grvsc-source {
padding-left: 0.75rem;
padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);
}
/* Line transformer styles */
.grvsc-has-line-highlighting > .grvsc-code > .grvsc-line::before {
content: ' ';
position: absolute;
width: 100%;
}
.grvsc-line-diff-add::before {
background-color: var(--grvsc-line-diff-add-background-color, rgba(0, 255, 60, 0.2));
}
.grvsc-line-diff-del::before {
background-color: var(--grvsc-line-diff-del-background-color, rgba(255, 0, 20, 0.2));
}
.grvsc-line-number {
padding: 0 2px;
text-align: right;
opacity: 0.7;
}
.abyss { background-color: #000c18; }
.abyss .mtki { font-style: italic; }
.abyss .mtk6 { color: #DDBB88; }
.abyss .mtk1 { color: #6688CC; }
.abyss .mtk15 { color: #9966B8; }
.abyss .mtk19 { color: #2277FF; }
.abyss .mtk7 { color: #225588; }
.abyss .grvsc-line-highlighted::before {
background-color: var(--grvsc-line-highlighted-background-color, rgba(255, 255, 255, 0.1));
box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, rgba(255, 255, 255, 0.5));
}
.default-light {
background-color: #FFFFFF;
color: #000000;
}
.default-light .grvsc-t7UkM5-17 { color: #A31515; }
.default-light .grvsc-t7UkM5-4 { color: #0000FF; }
.default-light .grvsc-t7UkM5-12 { color: #001080; }
.default-light .grvsc-line-highlighted::before {
background-color: var(--grvsc-line-highlighted-background-color, rgba(0, 0, 0, 0.05));
box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, rgba(0, 0, 0, 0.2));
}
/* Default Dark+ */
@media (prefers-color-scheme: dark) {
.grvsc-mm-tYvMB2 {
background-color: #1E1E1E;
color: #D4D4D4;
}
.grvsc-mm-tYvMB2 .grvsc-tYvMB2-8 { color: #CE9178; }
.grvsc-mm-tYvMB2 .grvsc-tYvMB2-4 { color: #569CD6; }
.grvsc-mm-tYvMB2 .grvsc-tYvMB2-12 { color: #9CDCFE; }
.grvsc-mm-tYvMB2 .grvsc-line-highlighted::before {
background-color: var(--grvsc-line-highlighted-background-color, rgba(255, 255, 255, 0.1));
box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, rgba(255, 255, 255, 0.5));
}
}
</style>