Skip to content

Commit

Permalink
Optimize code snippet background color
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Dec 18, 2020
1 parent f93b8ca commit b759787
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 5 additions & 6 deletions assets/css/_addon/syntax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ html[mode=dark] {
}

%code-snippet-radius {
border-radius: 5px;
border-radius: 6px;
}

%code-snippet-padding {
padding: 0.8rem 1rem;
padding: 1.5rem;
}

$code-font-size: 0.85rem;
Expand Down Expand Up @@ -69,8 +69,8 @@ div > pre {

overflow: auto;
.lineno {
margin: 0.8rem 0;
padding: 0 0.5rem;
margin-left: .2rem;
padding-right: .5rem;
min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno-color);
Expand Down Expand Up @@ -131,8 +131,7 @@ code {
}

td.rouge-code {
padding-left: 1rem;
padding-right: 1rem;
padding: 1.5rem 1.5rem 1.5rem 1rem;
}

/* Hide line numbers for default, console, and terminal code snippets */
Expand Down
12 changes: 6 additions & 6 deletions assets/css/_colors/dark-syntax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

@mixin dark-syntax {
/* ----- My styles ------ */
--highlight-bg-color: #272822;
--highlight-bg-color: #252525;
--highlighter-rouge-color: #de6b18;
--highlight-lineno-color: #6c6c6d;
--highlight-lineno-border-color: #3c4042;
--inline-code-bg: var(--highlight-bg-color);
--highlight-lineno-border-color: #303435;
--inline-code-bg: #272822;

.highlight {
.gp { color: #818c96; }
}

pre { color: #818c96; } /* override Bootstrap */
pre { color: #bfbfbf; } /* override Bootstrap */
kbd { background-color: black; }

/* syntax highlight colors from https://raw.githubusercontent.com/jwarby/pygments-css/master/monokai.css */
.highlight pre { background-color: #272822; }
.highlight .hll { background-color: #272822; }
.highlight pre { background-color: var(--highlight-bg-color); }
.highlight .hll { background-color: var(--highlight-bg-color); }
.highlight .c { color: #75715e; } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010; } /* Error */
.highlight .k { color: #66d9ef; } /* Keyword */
Expand Down

0 comments on commit b759787

Please sign in to comment.