css-variables-pigment
Installation
SKILL.md
MUI CSS Variables & Pigment CSS Skill
1. CssVarsProvider (MUI v6)
CssVarsProvider replaces ThemeProvider when you want CSS-variable-based theming. Instead of injecting theme values into a JS context that triggers React re-renders on change, it emits CSS custom properties on the root element. Color scheme switches happen in CSS alone — no React tree re-render.
Basic setup
import { CssVarsProvider, extendTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';