-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles-code.css
More file actions
151 lines (129 loc) · 2.31 KB
/
styles-code.css
File metadata and controls
151 lines (129 loc) · 2.31 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
pre code {
background-color: #f0f0f0;
display: block;
overflow-x: auto;
padding: 1em;
}
/* Highlight.js Theme */
.hljs {
display: block;
overflow-x: auto;
padding: 1.5rem;
background: #eff1f5;
color: #4c4f69;
border-radius: 12px;
font-family: "Fira Code", "Consolas", "Monaco", monospace;
font-size: 1rem;
line-height: 1.5;
box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.03);
}
.hljs-comment {
color: #6c6f85;
font-style: italic;
}
.hljs-punctuation,
.hljs-tag {
color: #7c7f93;
}
.hljs-tag .hljs-attr,
.hljs-tag .hljs-name {
color: #4c4f69;
}
.hljs-attribute,
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-name,
.hljs-selector-tag {
color: #8839ef;
font-weight: 700;
}
.hljs-deletion,
.hljs-quote,
.hljs-selector-class,
.hljs-selector-id,
.hljs-template-tag {
color: #d20f39;
}
.hljs-number {
color: #fe640b;
}
.hljs-string {
color: #40a02b;
}
.hljs-type {
color: #1e66f5;
}
.hljs-section,
.hljs-title {
color: #1e66f5;
font-weight: 700;
}
.hljs-link,
.hljs-operator,
.hljs-regexp,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-symbol,
.hljs-template-variable,
.hljs-variable {
color: #ab5656;
}
.hljs-literal {
color: #179299;
}
.hljs-addition,
.hljs-built_in,
.hljs-bullet,
.hljs-code {
color: #40a02b;
}
.hljs-meta {
color: #209fb5;
}
.hljs-meta .hljs-string {
color: #04a5e5;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: 700;
}
/* 代码块的复制按钮*/
.copy-btn {
position: absolute;
top: 0px;
right: 0px;
padding: 5px 10px;
background-color: transparent;
color: transparent;
font-size: 0.7em;
border: none;
cursor: pointer;
overflow: hidden;
}
.copy-btn:hover {
color: black;
}
.copy-btn::after {
content: "";
position: absolute;
top: 0;
right: 0;
border-width: 0 10px 10px 0;
border-style: solid;
border-color: #fff #fff transparent transparent;
background-color: #777;
}
/* 制表符专用样式 */
pre.ascii-table {
line-height: 1em !important; /* 强制行高为 1em,消除行间距 */
font-family: "Cascadia Code", "Courier New", monospace; /* 必须使用等宽字体 */
letter-spacing: 0; /* 消除字间距 */
font-variant-ligatures: none; /* 禁用连字 */
}
pre.ascii-table code {
line-height: 1em !important;
white-space: pre; /* 确保空格不合并 */
}