Skip to content

Glossary: Tailwind CSS

data-theme

An HTML attribute, typically set on `<html>`, that records which theme is chosen, such as `data-theme="dark"`. Combined with `@custom-variant`, it lets visitors pick light or dark regardless of their device setting.

Where the book teaches it

Related terms

@custom-variantDark mode