We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b18657 commit 46cf1e6Copy full SHA for 46cf1e6
1 file changed
docs/stylesheets/extra.css
@@ -1,3 +1,33 @@
1
/* 自定义样式 */
2
3
/* 可在此处添加全局样式覆盖 */
4
+
5
+/* 代码块行号显示 (pymdownx-inline 模式) */
6
+code .hll { display: block; }
7
+code [id^="__span"] {
8
+ display: inline;
9
+}
10
11
+/* 行号列 */
12
+.highlight [id^="__span"]::before {
13
+ counter-increment: linenums;
14
+ content: counter(linenums);
15
+ display: inline-block;
16
+ min-width: 2.5em;
17
+ padding-right: 0.8em;
18
+ margin-right: 0.5em;
19
+ text-align: right;
20
+ color: var(--md-default-fg-color--light);
21
+ border-right: 1px solid var(--md-default-fg-color--lighter);
22
+ user-select: none;
23
+ -webkit-user-select: none;
24
25
26
+.highlight pre {
27
+ counter-reset: linenums;
28
29
30
+/* 行号高亮时的样式 */
31
+.highlight [id^="__span"]:target {
32
+ background-color: var(--md-code-hl-color);
33
0 commit comments