Skip to content

Commit 07337a9

Browse files
committed
fix: final fix for the code line number highlights
1 parent d970564 commit 07337a9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/client/theme-default/styles/code.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ code {
33
border-radius: 3px;
44
padding: .25rem .5rem;
55
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
6-
font-size: var(--code-font-size);
6+
font-size: 14px;
77
color: var(--c-text-light);
88
background-color: rgba(27, 31, 35, .05);
99
}
@@ -18,10 +18,10 @@ code .token.inserted {
1818

1919
div[class*='language-'] {
2020
position: relative;
21-
margin: .85rem 0;
21+
margin: 14px 0;
2222
border-radius: 6px;
2323
padding: .5rem 1.5rem;
24-
line-height: 1.5;
24+
line-height: 24px;
2525
background-color: var(--code-bg-color);
2626
overflow-x: auto;
2727
}
@@ -44,7 +44,7 @@ div[class*='language-'] {
4444
word-spacing: normal;
4545
word-break: normal;
4646
word-wrap: normal;
47-
line-height: 1.5;
47+
line-height: 24px;
4848
-moz-tab-size: 4;
4949
-o-tab-size: 4;
5050
tab-size: 4;
@@ -62,8 +62,9 @@ div[class*='language-'] {
6262
left: 0;
6363
padding-top: var(--code-padding-vertical);
6464
width: 100%;
65-
line-height: 1.5;
66-
font-size: var(--code-font-size);
65+
line-height: 24px;
66+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
67+
font-size: 14px;
6768
user-select: none;
6869
}
6970

@@ -85,8 +86,8 @@ div[class*='language-'].line-numbers-mode {
8586
padding: var(--code-padding-vertical) 0;
8687
width: 3.5rem;
8788
text-align: center;
88-
line-height: 1.5;
89-
font-size: var(--code-font-size);
89+
line-height: 24px;
90+
font-size: 16px;
9091
color: #888;
9192
z-index: 4;
9293
}

src/client/theme-default/styles/vars.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
--c-bg: var(--c-white);
4848

4949
--code-padding-vertical: 1.5rem;
50-
--code-font-size: .85rem;
5150
--code-bg-color: #282c34;
5251

5352
}

0 commit comments

Comments
 (0)