UNPKG

histoire

Version:

A fast story book powered by Vite

15 lines (13 loc) • 451 B
import { parseColor } from '../colors.js' import type { Context } from '../context.js' export function resolvedTheme(ctx: Context) { 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 }