Repository navigation
Expand file tree
/
Copy pathCode.css
More file actions
113 lines (97 loc) · 1.84 KB
/
Copy pathCode.css
File metadata and controls
113 lines (97 loc) · 1.84 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
.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-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 white;
}
.code-cursor-after::after {
right: -1px;
border-right: 2px solid white;
}
@keyframes code-cursor-blink {
50% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.code-cursor-before::before,
.code-cursor-after::after {
animation: none;
}
}