Skip to content

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.

css
: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 */
}
VariableDefaultUsed for
--m-card#ffffffcontrol surfaces
--m-ink#1d1a4atext, borders, lettering ink
--m-dim#4f4a80placeholders, idle tabs
--m-soft#b8b3ffhard drop shadows
--m-pri#8f8df7fills
--m-acc#ff5fa8accents
--m-track#c9cbe0empty tracks
--m-r15pxcorner radius
--m-bw3.2pxborder width
--m-sh6px 7px 0 var(--m-soft)shadow
--m-font / --m-font-displaysystem stack / "M Udar", then systembody / display type (M Udar needs vue-manga-ui/font.css)
--m-fx-fill / --m-fx-shade / --m-fx-linewhite / lavender / violettwo-tone effects on the canvas
--m-fx-ink#1d1a4asound-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
<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:

ts
import { useDark } from '@vueuse/core';
const isDark = useDark(); // system preference, then whatever the user toggles; remembered

The 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:

css
.dark {
  --m-acc: #3ee0c4;
}

Effects read <html>, so on a page whose <html> is light, a dark section still gets light-theme effect colors.