Prettified the inline-code code style.

This commit is contained in:
Cotes Chung 2020-06-22 21:08:36 +08:00
parent edeb08aa28
commit 42e0617bde
3 changed files with 10 additions and 2 deletions

View file

@ -39,7 +39,7 @@ html[mode=dark] {
} }
.highlighter-rouge { .highlighter-rouge {
background: var(--highlight-bg-color); background-color: var(--highlight-bg-color);
@extend %code-snippet-radius; @extend %code-snippet-radius;
color: var(--highlighter-rouge-color); color: var(--highlighter-rouge-color);
margin-bottom: 1.2em; /* Override BS Inline-code style */ margin-bottom: 1.2em; /* Override BS Inline-code style */
@ -94,16 +94,21 @@ code {
-moz-hyphens: none; -moz-hyphens: none;
hyphens: none; hyphens: none;
&.highlighter-rouge { &.highlighter-rouge {
padding: 2px 4px; padding: 3px 5px;
margin: 0 .15rem; margin: 0 .15rem;
border-radius: 4px; border-radius: 4px;
background-color: var(--inline-code-bg);
} }
@at-root a>&.highlighter-rouge { @at-root a>&.highlighter-rouge {
padding-bottom: 0; // show link's underlinke padding-bottom: 0; // show link's underlinke
color: inherit;
} }
@at-root a:hover>&.highlighter-rouge { @at-root a:hover>&.highlighter-rouge {
border-bottom: none; border-bottom: none;
} }
blockquote &.highlighter-rouge {
color: inherit;
}
} }
td.rouge-code { td.rouge-code {

View file

@ -83,6 +83,8 @@
--highlight-lineno-color: #6c6c6d; --highlight-lineno-color: #6c6c6d;
--highlight-lineno-border-color: #3c4042; --highlight-lineno-border-color: #3c4042;
--inline-code-bg: var(--highlight-bg-color);
.highlight { .highlight {
.gp { color: #818c96; } .gp { color: #818c96; }
} }

View file

@ -76,4 +76,5 @@
--highlight-lineno-color: #c2c6cc; --highlight-lineno-color: #c2c6cc;
--highlight-lineno-border-color: #e9ecef; --highlight-lineno-border-color: #e9ecef;
--inline-code-bg: #f3f3f3;
} // light-syntax } // light-syntax