Skip to content

Commit

Permalink
fix: final fix for the code line number highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Nov 24, 2020
1 parent d970564 commit 07337a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/client/theme-default/styles/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ code {
border-radius: 3px;
padding: .25rem .5rem;
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: var(--code-font-size);
font-size: 14px;
color: var(--c-text-light);
background-color: rgba(27, 31, 35, .05);
}
Expand All @@ -18,10 +18,10 @@ code .token.inserted {

div[class*='language-'] {
position: relative;
margin: .85rem 0;
margin: 14px 0;
border-radius: 6px;
padding: .5rem 1.5rem;
line-height: 1.5;
line-height: 24px;
background-color: var(--code-bg-color);
overflow-x: auto;
}
Expand All @@ -44,7 +44,7 @@ div[class*='language-'] {
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
line-height: 24px;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
Expand All @@ -62,8 +62,9 @@ div[class*='language-'] {
left: 0;
padding-top: var(--code-padding-vertical);
width: 100%;
line-height: 1.5;
font-size: var(--code-font-size);
line-height: 24px;
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 14px;
user-select: none;
}

Expand All @@ -85,8 +86,8 @@ div[class*='language-'].line-numbers-mode {
padding: var(--code-padding-vertical) 0;
width: 3.5rem;
text-align: center;
line-height: 1.5;
font-size: var(--code-font-size);
line-height: 24px;
font-size: 16px;
color: #888;
z-index: 4;
}
Expand Down
1 change: 0 additions & 1 deletion src/client/theme-default/styles/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
--c-bg: var(--c-white);

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

}

0 comments on commit 07337a9

Please sign in to comment.