Skip to content

Commit

Permalink
fix: syntax highlight style
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Aug 21, 2019
1 parent a2eb95a commit 6b2f4f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
33 changes: 14 additions & 19 deletions assets/scss/_common/single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,24 @@ pre {
overflow: auto;
font-size: $fontSize * 0.8;
margin: ($fontSize * 2) 0;
padding: 1em;
line-height: 1.618;
background-color: alpha(var(--color-contrast-lower), 0.5);
}
.highlight {
font-size: 0.8em;
margin: ($fontSize * 2) 0;
line-height: 1.618;
background-color: var(--color-contrast-lower);
code {
margin: 0;
padding: 0;
font-size: 1em;
background-color: unset;
}
pre {
margin: 1em 0;
}
table {
border-collapse: separate;
margin: 0;
padding: 1em;
overflow: hidden;
background-color: unset;
}
th, td {
font-size: inherit;
Expand All @@ -214,19 +216,12 @@ pre {
background-color: inherit;
}
}
span.lnt {
user-select: none;
display: block;
margin: 0 !important;
padding: 0 !important;
}
.lntable {
padding: 0 1em !important;
}
.lntd {
padding-right: 1em !important;
pre {
overflow: hidden;
.chroma {
.lnt {
user-select: none;
display: block;
margin-right: -1em !important;
padding: 0 !important;
}
}

Expand Down
4 changes: 2 additions & 2 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@
@import "_common/_highlight/light.scss";
.chroma {
color: var(--color-contrast-high);
background-color: var(--color-contrast-lower);
background-color: alpha(var(--color-contrast-lower), 0.5);
}
{{ if .Site.Params.enableDarkMode }}
@import "_common/_highlight/dark.scss";
.chroma-dark {
color: var(--color-contrast-high);
background-color: var(--color-contrast-lower);
background-color: alpha(var(--color-contrast-lower), 0.5);
}
{{ end }}
{{ end }}
Expand Down

0 comments on commit 6b2f4f5

Please sign in to comment.