UNPKG

@mdkva/themekit

Version:

MDKVA ThemeKit provides simple, fast, and developer-friendly utilities for theme switching — including dark mode, light mode, and system-mode detection — designed for modern web applications.

35 lines (31 loc) 823 B
/*! MDKVA ThemeKit /* Lightweight theme variable system for modern web apps */ /* -------------------------------------------------- Light Mode (default) -------------------------------------------------- */ :root { --bg: #ffffff; --text: #000000; } /* -------------------------------------------------- Dark Mode -------------------------------------------------- */ [data-theme="dark"] { --bg: #000000; --text: #ffffff; } /* -------------------------------------------------- Apply Theme Variables -------------------------------------------------- */ html { background: var(--bg); color: var(--text); transition: background 0.25s ease, color 0.25s ease; } /* body inherits theme */ body { margin: 0; padding: 0; background: inherit; color: inherit; }