review edits

This commit is contained in:
dvdherron 2023-02-21 17:29:45 +01:00
parent d322926405
commit dfe56978c5
4 changed files with 19 additions and 13 deletions

View File

@ -75,6 +75,6 @@ h6 {
} }
to { to {
background-color: #f8f8f8; background-color: var(--color-code-bg);
} }
} }

View File

@ -5,3 +5,5 @@ $highlight: color.adjust(brand.$sl-color--hopbush, $lightness: -10%);
$action: color.adjust(brand.$sl-color--bouquet, $lightness: -10%); $action: color.adjust(brand.$sl-color--bouquet, $lightness: -10%);
$shadow: rgba(brand.$sl-color--midnight-blue, 0.125); $shadow: rgba(brand.$sl-color--midnight-blue, 0.125);
$active: color.adjust(brand.$sl-color--venus, $lightness: -10%); $active: color.adjust(brand.$sl-color--venus, $lightness: -10%);
$color-code-bg: #f8f8f8;
$color-code-text: color.adjust(brand.$sl-color--pale-sky, $lightness: -25%);

View File

@ -7,14 +7,18 @@
code[class*="language-"], code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
background-color: #f8f8f8; background-color: var(--color-code-bg);
hyphens: none; hyphens: none;
word-spacing: normal;
word-break: normal; word-break: normal;
word-spacing: normal;
tab-size: 4; tab-size: 4;
text-align: left; text-align: left;
} }
.token {
color: var(--color-code-text);
}
.token table td { padding: functions.sl-px-to-rem(5px); } .token table td { padding: functions.sl-px-to-rem(5px); }
.token table pre { margin: 0; } .token table pre { margin: 0; }
@ -22,13 +26,13 @@ pre[class*="language-"] {
.token.prolog, .token.prolog,
.token.doctype, .token.doctype,
.token.cdata { .token.cdata {
color: #656556; --color-code-text: #656556;
font-style: italic; font-style: italic;
} }
[class*="language-css"] { [class*="language-css"] {
& .token.comment { & .token.comment {
color: #006666; --color-code-text: #006666;
} }
} }
@ -38,12 +42,12 @@ pre[class*="language-"] {
.token.string, .token.string,
.token.attr-value { .token.attr-value {
color: #df1144; --color-code-text: #df1144;
} }
.token.punctuation, .token.punctuation,
.token.operator { .token.operator {
color: #393A34; /* no highlight */ --color-code-text: #393A34; /* no highlight */
font-weight: bold; font-weight: bold;
} }
@ -56,7 +60,7 @@ pre[class*="language-"] {
.token.property, .token.property,
.token.regex, .token.regex,
.token.inserted { .token.inserted {
color: #990000; --color-code-text: #990000;
font-weight: bold; font-weight: bold;
} }
@ -65,20 +69,20 @@ pre[class*="language-"] {
.token.keyword, .token.keyword,
.token.attr-name, .token.attr-name,
.language-autohotkey .token.selector { .language-autohotkey .token.selector {
color: #000000; --color-code-text: #000000;
font-weight: bold; font-weight: bold;
} }
.token.function, .token.function,
.token.deleted, .token.deleted,
.language-autohotkey .token.tag { .language-autohotkey .token.tag {
color: #9a050f; --color-code-text: #9a050f;
} }
.token.tag, .token.tag,
.token.selector, .token.selector,
.language-autohotkey .token.keyword { .language-autohotkey .token.keyword {
color: #445588; --color-code-text: #445588;
font-weight: bold; font-weight: bold;
} }
@ -94,6 +98,6 @@ pre[class*="language-"] {
.token.variable, .token.variable,
.token[class*="placeholder"] { .token[class*="placeholder"] {
color: #006666; --color-code-text: #006666;
font-weight: normal; font-weight: normal;
} }

View File

@ -83,7 +83,7 @@ a {
code, code,
pre { pre {
border-radius: functions.sl-px-to-em(2px); border-radius: functions.sl-px-to-em(2px);
color: color.adjust($sl-color--pale-sky, $lightness: -25%); color: var(--color-code-text);
a & { a & {
color: inherit; color: inherit;