themeSelector
Theme
stable
Compute the CSS selector that a theme block targets based on its name and mode. Returns `:root` for the default theme, `[data-theme="name"]` for named themes, and compound selectors when both name and mode are set.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- themerequisIOrigamTheme
- The theme descriptor. `name` and `mode` ("light" | "dark" | "auto") control which selector is emitted. A mode of "auto" is treated as absent.
API
Valeur de retour
La valeur retournée par cet util.
- A CSS selector string: `:root`, `[data-theme="name"]`, `[data-mode="dark"]`, or a compound `[data-theme="name"][data-mode="dark"]`.
Usage
Exemples
Extraits de code prêts à coller.
Selector for various theme configurations