histoire
Version:
A fast story book powered by Vite
13 lines (12 loc) • 427 B
JavaScript
import { parseColor } from '../colors.js';
export function resolvedTheme(ctx) {
let css = '*, ::before, ::after {';
// Colors
for (const color in ctx.config.theme?.colors ?? {}) {
for (const key in ctx.config.theme.colors[color]) {
css += `--_histoire-color-${color}-${key}: ${parseColor(ctx.config.theme.colors[color][key]).color.join(' ')};`;
}
}
css += '}';
return css;
}