Definition
Tailwind directives are custom at-rules (CSS instructions starting with @) specific to Tailwind CSS, used in your source CSS files to control how Tailwind generates styles. They provide functionality like injecting base styles or applying utilities.
"Directive" in this context means a Tailwind-specific command that directs the compiler (PostCSS/Tailwind) to perform actions, such as:
- @tailwind
: inserts core styles
- @apply
: applies utilities to a selector
- @layer
: organizes custom styles
- @theme
: defines design tokens.
They are pre-compilation tools, transformed into standard CSS during the build process.