Skip to content

Commit 95839df

Browse files
committed
fix(styles): add dark and light mixins for .shiki class
1 parent 436194b commit 95839df

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/GZCTF/ClientApp/src/styles/shared/Typography.module.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
max-width: max-content;
44
min-width: 100%;
55

6+
& :global(.shiki),
7+
& :global(.shiki) span {
8+
@mixin dark {
9+
font-style: var(--code-dark-font-style);
10+
font-weight: var(--code-dark-font-weight);
11+
text-decoration: var(--code-dark-text-decoration);
12+
}
13+
14+
@mixin light {
15+
font-style: var(--code-light-font-style);
16+
font-weight: var(--code-light-font-weight);
17+
text-decoration: var(--code-light-text-decoration);
18+
}
19+
}
20+
621
& :where(p) {
722
word-break: break-word;
823
word-wrap: break-word;

src/GZCTF/ClientApp/src/utils/marked/ShikiExtension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const highlight = async (code: string, lang: string) => {
5858
dark: 'material-theme-darker',
5959
light: 'material-theme-lighter',
6060
},
61+
cssVariablePrefix: '--code-',
6162
defaultColor: 'light-dark()',
6263
transformers: [
6364
transformerNotationDiff(),

0 commit comments

Comments
 (0)