Repository navigation
Expand file tree
/
Copy pathCode.css
More file actions
168 lines (139 loc) · 2.6 KB
/
Copy pathCode.css
File metadata and controls
168 lines (139 loc) · 2.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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
.code-container {
position: relative;
width: 100%;
min-height: 50px;
counter-reset: line;
margin-bottom: 0.25rem;
}
.code-container .shiki {
line-height: 1rem;
}
.code-container .line {
position: relative;
margin-left: 1.5rem;
}
.code-container .line::before {
content: counter(line);
counter-increment: line;
position: absolute;
left: -40px;
padding-left: 0.5em;
padding-right: 0.5em;
text-align: right;
height: 135%;
color: rgb(115 138 148 0.4);
border-right: 1px solid rgb(115 138 148 0.4);
}
.code-ws-symbol {
color: #666;
}
.code-copy-button,
.code-container > .code-link {
display: none;
position: absolute;
top: 0.5em;
background-color: rgb(216 222 233);
border: none;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 0.75rem;
height: 1.75rem;
}
.code-container:hover .code-copy-button,
.code-container:hover .code-link {
display: block;
}
.code-copy-button {
right: 7.5em;
}
.code-container > .code-link {
right: 0.5em;
}
.code-container > .code-link::before {
display: inline-block;
width: 1.25rem;
height: 0.75rem;
}
[data-theme="dark"]:root {
.code-copy-button,
.code-container > .code-link {
background-color: #444;
}
}
/* Code selection */
.code-selection {
background-color: #264f78;
}
/* Code cursor */
.code-cursor-before,
.code-cursor-after {
position: relative;
}
.code-cursor-before::before,
.code-cursor-after::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
width: 0;
pointer-events: none;
opacity: 1;
animation: code-cursor-blink 1s step-end infinite;
}
.code-cursor-before::before {
left: -1px;
border-left: 2px solid #aeafad;
}
.code-cursor-after::after {
right: -1px;
border-right: 2px solid #aeafad;
}
@keyframes code-cursor-blink {
50% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.code-cursor-before::before,
.code-cursor-after::after {
animation: none;
}
}
/* Code hat */
.code-hat {
position: relative;
}
.code-hat::before {
content: "";
position: absolute;
top: 0.15em;
left: 50%;
width: 0.3em;
height: 0.3em;
border-radius: 50%;
transform: translate(-50%, -100%);
pointer-events: none;
}
.code-hat-default::before {
background-color: #b9b6cd;
}
.code-hat-blue::before {
background-color: #089ad3;
}
.code-hat-green::before {
background-color: #36b33f;
}
.code-hat-red::before {
background-color: #e02d28;
}
.code-hat-pink::before {
background-color: #e06caa;
}
.code-hat-yellow::before {
background-color: #e5c02c;
}
/* Code mark referenced */
.code-mark {
background-color: var(--code-mark-color);
}