Theming
Every color and size is a CSS variable with the --m- prefix. Defaults are declared with :where(:root), so any value you set on :root wins without !important.
:root {
--m-acc: #00c2a8; /* accent: ticks, checks, focus ring */
--m-pri: #ffb020; /* primary fill: toggle, slider, progress */
--m-fx-line: #0a6b5e; /* outline of drawn effects */
}| Variable | Default | Used for |
|---|---|---|
--m-card | #ffffff | control surfaces |
--m-ink | #1d1a4a | text, borders, lettering ink |
--m-dim | #4f4a80 | placeholders, idle tabs |
--m-soft | #b8b3ff | hard drop shadows |
--m-pri | #8f8df7 | fills |
--m-acc | #ff5fa8 | accents |
--m-track | #c9cbe0 | empty tracks |
--m-r | 15px | corner radius |
--m-bw | 3.2px | border width |
--m-sh | 6px 7px 0 var(--m-soft) | shadow |
--m-font / --m-font-display | system stack / "M Udar", then system | body / display type (M Udar needs vue-manga-ui/font.css) |
--m-fx-fill / --m-fx-shade / --m-fx-line | white / lavender / violet | two-tone effects on the canvas |
--m-fx-ink | #1d1a4a | sound-effect lettering; stays dark in the dark theme, like manga ink |
Effects read --m-fx-* and --m-acc from <html> at the moment they start, so a theme switch applies to the next effect.
Dark theme
The kit ships a dark set of the same variables. It turns on under the class dark or data-theme="dark", on <html> or on any ancestor of the components:
<html class="dark">That is the class VitePress, VueUse useDark(), Tailwind and Nuxt Color Mode already put on <html>, so in those apps the kit follows the app's theme with no setup. To follow the system until the user picks a theme, VueUse does it in one line:
import { useDark } from '@vueuse/core';
const isDark = useDark(); // system preference, then whatever the user toggles; rememberedThe dark values pass WCAG AA for text: ink on card 13.6:1, dimmed text on card 7.7:1 and on tracks 5.6:1. Override them the same way as the light ones, under your dark selector:
.dark {
--m-acc: #3ee0c4;
}Effects read <html>, so on a page whose <html> is light, a dark section still gets light-theme effect colors.