generated from chrismwilliams/astro-theme-cactus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ec.config.mjs
29 lines (28 loc) · 1.03 KB
/
ec.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { defineEcConfig } from "astro-expressive-code";
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
export default defineEcConfig({
plugins: [pluginCollapsibleSections()],
themes: ["dracula", "github-light"],
themeCssSelector(theme, { styleVariants }) {
if (styleVariants.length >= 2) {
const baseTheme = styleVariants[0]?.theme;
const altTheme = styleVariants.find((v) => v.theme.type !== baseTheme?.type)?.theme;
if (theme === baseTheme || theme === altTheme) return `[data-theme='${theme.type}']`;
}
return `[data-theme="${theme.name}"]`;
},
useThemedScrollbars: false,
styleOverrides: {
frames: {
frameBoxShadowCssValue: "none",
},
uiLineHeight: "inherit",
codeFontSize: "0.875rem",
codeLineHeight: "1.7142857rem",
borderRadius: "4px",
codePaddingInline: "1rem",
codeFontFamily:
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;',
},
});