2023-06-28 21:01:24 +02:00
|
|
|
@use '../config';
|
2023-01-12 19:19:42 +01:00
|
|
|
|
2023-02-08 21:23:21 +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-02-08 21:23:21 +01:00
|
|
|
*/
|
2023-01-06 22:40:29 +01:00
|
|
|
|
2023-02-08 21:23:21 +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-08 21:23:21 +01:00
|
|
|
}
|
|
|
|
|
2023-02-21 17:29:45 +01:00
|
|
|
.token {
|
2023-03-03 23:30:46 +01:00
|
|
|
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 {
|
2023-06-28 21:01:24 +02:00
|
|
|
padding: config.sl-px-to-rem(5px);
|
2023-02-24 21:56:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.token table pre {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2023-01-06 22:40:29 +01:00
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.comment,
|
|
|
|
.token.prolog,
|
|
|
|
.token.doctype,
|
|
|
|
.token.cdata {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-muted);
|
2023-02-24 21:56:47 +01:00
|
|
|
font-style: italic;
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-05-30 22:11:36 +02:00
|
|
|
[class*='language-scss'] {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-base);
|
2023-05-30 22:11:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
[class*='language-css'] {
|
2023-02-24 21:56:47 +01:00
|
|
|
& .token.comment {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-base);
|
2023-02-08 21:23:21 +01:00
|
|
|
}
|
2023-02-24 21:56:47 +01:00
|
|
|
}
|
2023-01-06 22:40:29 +01:00
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.namespace {
|
2023-02-24 21:56:47 +01:00
|
|
|
opacity: 0.7;
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.string,
|
|
|
|
.token.attr-value {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-bright);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.punctuation,
|
|
|
|
.token.operator {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-muted-dark);
|
2023-02-24 21:56:47 +01:00
|
|
|
/* no highlight */
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--bold);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.entity,
|
|
|
|
.token.url,
|
|
|
|
.token.symbol,
|
|
|
|
.token.number,
|
|
|
|
.token.boolean,
|
|
|
|
.token.constant,
|
|
|
|
.token.property,
|
|
|
|
.token.regex,
|
|
|
|
.token.inserted {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-warm);
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--bold);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.atrule,
|
|
|
|
.token.keyword,
|
|
|
|
.token.attr-name,
|
|
|
|
.language-autohotkey .token.selector {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-dark);
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--bold);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.function,
|
|
|
|
.token.deleted,
|
|
|
|
.language-autohotkey .token.tag {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-bright-dark);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.tag,
|
|
|
|
.token.selector,
|
|
|
|
.language-autohotkey .token.keyword {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-cool);
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--bold);
|
2023-01-06 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +01:00
|
|
|
.token.important,
|
|
|
|
.token.function,
|
|
|
|
.token.bold {
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-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 {
|
2023-03-03 23:30:46 +01:00
|
|
|
--sl-color--code-text: unset;
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--regular);
|
2023-02-22 17:11:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-08 21:23:21 +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"] {
|
2023-05-30 22:42:18 +02:00
|
|
|
--sl-color--code-text: var(--sl-color--code-base);
|
2023-06-28 21:01:24 +02:00
|
|
|
font-weight: var(--sl-font-weight--regular);
|
2023-02-25 00:16:57 +01:00
|
|
|
}
|