DarkModeStrategy Type — tailwindcss Architecture
Architecture documentation for the DarkModeStrategy type/interface in types.ts from the tailwindcss codebase.
Entity Profile
Source Code
packages/tailwindcss/src/compat/config/types.ts lines 42–63
type DarkModeStrategy =
// No dark mode support
| false
// Use the `media` query strategy.
| 'media'
// Use the `class` strategy, which requires a `.dark` class on the `html`.
| 'class'
// Use the `class` strategy with a custom class instead of `.dark`.
| ['class', string]
// Use the `selector` strategy — same as `class` but uses `:where()` for more predictable behavior
| 'selector'
// Use the `selector` strategy with a custom selector instead of `.dark`.
| ['selector', string]
// Use the `variant` strategy, which allows you to completely customize the selector
// It takes a string or an array of strings, which are passed directly to `addVariant()`
| ['variant', string | string[]]
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free