sass-site/source/assets/sass/vendor/_syntax-accessible.scss

117 lines
1.8 KiB
SCSS
Raw Normal View History

2023-01-19 22:16:48 +01:00
@use '../functions';
2023-01-12 19:19:42 +01:00
/**
* Based on the GHColors theme by Avi Aryan (http://aviaryan.in)
2023-02-21 17:20:10 +01:00
* Inspired by GitHub syntax coloring
*/
2023-01-06 22:40:29 +01:00
code[class*="language-"],
pre[class*="language-"] {
2023-03-13 21:02:24 +01:00
background-color: var(--sl-color--code-background);
2023-02-09 22:15:01 +01:00
hyphens: none;
2023-02-21 17:29:45 +01:00
word-break: normal;
2023-02-24 21:56:47 +01:00
word-spacing: normal;
tab-size: 4;
2023-02-09 22:15:01 +01:00
text-align: left;
}
2023-02-21 17:29:45 +01:00
.token {
color: var(--sl-color--code-text);
2023-02-21 17:29:45 +01:00
}
2023-02-24 21:56:47 +01:00
.token table td {
padding: functions.sl-px-to-rem(5px);
}
.token table pre {
margin: 0;
}
2023-01-06 22:40:29 +01:00
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
--sl-color--code-text: #656556;
2023-02-24 21:56:47 +01:00
font-style: italic;
2023-01-06 22:40:29 +01:00
}
2023-02-09 22:15:01 +01:00
[class*="language-css"] {
2023-02-24 21:56:47 +01:00
& .token.comment {
--sl-color--code-text: #006666;
}
2023-02-24 21:56:47 +01:00
}
2023-01-06 22:40:29 +01:00
.token.namespace {
2023-02-24 21:56:47 +01:00
opacity: 0.7;
2023-01-06 22:40:29 +01:00
}
.token.string,
.token.attr-value {
--sl-color--code-text: #df1144;
2023-01-06 22:40:29 +01:00
}
.token.punctuation,
.token.operator {
--sl-color--code-text: #393A34;
2023-02-24 21:56:47 +01:00
/* no highlight */
2023-01-06 22:40:29 +01:00
font-weight: bold;
}
.token.entity,
.token.url,
.token.symbol,
.token.number,
.token.boolean,
.token.constant,
.token.property,
.token.regex,
.token.inserted {
--sl-color--code-text: #990000;
2023-01-06 22:40:29 +01:00
font-weight: bold;
}
.token.atrule,
.token.keyword,
.token.attr-name,
.language-autohotkey .token.selector {
--sl-color--code-text: #000000;
2023-01-06 22:40:29 +01:00
font-weight: bold;
}
.token.function,
.token.deleted,
.language-autohotkey .token.tag {
--sl-color--code-text: #9a050f;
2023-01-06 22:40:29 +01:00
}
.token.tag,
.token.selector,
.language-autohotkey .token.keyword {
--sl-color--code-text: #445588;
2023-01-06 22:40:29 +01:00
font-weight: bold;
}
.token.important,
.token.function,
.token.bold {
2023-02-21 17:20:10 +01:00
font-weight: bold;
2023-01-06 22:40:29 +01:00
}
2023-02-24 21:56:47 +01:00
[class*="language-shell"] {
2023-02-22 17:11:29 +01:00
& .token.function {
--sl-color--code-text: unset;
2023-02-24 21:56:47 +01:00
font-weight: normal;
2023-02-22 17:11:29 +01:00
}
}
.token.italic {
2023-02-21 17:20:10 +01:00
font-style: italic;
2023-01-31 20:18:33 +01:00
}
2023-02-09 22:15:01 +01:00
.token.variable,
.token[class*="placeholder"] {
--sl-color--code-text: #006666;
2023-02-09 22:15:01 +01:00
font-weight: normal;
2023-02-25 00:16:57 +01:00
}