sass-site/source/assets/sass/vendor/_syntax-accessible.scss
2023-02-22 17:11:29 +01:00

111 lines
1.7 KiB
SCSS

@use '../functions';
/**
* Based on the GHColors theme by Avi Aryan (http://aviaryan.in)
* Inspired by GitHub syntax coloring
*/
code[class*="language-"],
pre[class*="language-"] {
background-color: var(--color-code--bg);
hyphens: none;
word-break: normal;
word-spacing: normal;
tab-size: 4;
text-align: left;
}
.token {
color: var(--color-code--text);
}
.token table td { padding: functions.sl-px-to-rem(5px); }
.token table pre { margin: 0; }
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
--color-code--text: #656556;
font-style: italic;
}
[class*="language-css"] {
& .token.comment {
--color-code--text: #006666;
}
}
.token.namespace {
opacity: .7;
}
.token.string,
.token.attr-value {
--color-code--text: #df1144;
}
.token.punctuation,
.token.operator {
--color-code--text: #393A34; /* no highlight */
font-weight: bold;
}
.token.entity,
.token.url,
.token.symbol,
.token.number,
.token.boolean,
.token.constant,
.token.property,
.token.regex,
.token.inserted {
--color-code--text: #990000;
font-weight: bold;
}
.token.atrule,
.token.keyword,
.token.attr-name,
.language-autohotkey .token.selector {
--color-code--text: #000000;
font-weight: bold;
}
.token.function,
.token.deleted,
.language-autohotkey .token.tag {
--color-code--text: #9a050f;
}
.token.tag,
.token.selector,
.language-autohotkey .token.keyword {
--color-code--text: #445588;
font-weight: bold;
}
.token.important,
.token.function,
.token.bold {
font-weight: bold;
}
[class*="language-shell"] {
& .token.function {
--color-code--text: unset;
font-weight: normal;
}
}
.token.italic {
font-style: italic;
}
.token.variable,
.token[class*="placeholder"] {
--color-code--text: #006666;
font-weight: normal;
}