Code Reference

Glossary

Tailwind · Reference cheat sheet

Glossary

Tailwind · Reference cheat sheet


📋 Overview

Alphabetical glossary of Tailwind CSS utility-first and configuration terms.

🔧 Core concepts

TermDefinition
Arbitrary valueBracket syntax like w-[14ch] for one-off CSS values.
Content pathsGlob list of files Tailwind scans for class names.
Core pluginBuilt-in feature group that can be disabled.
Design tokenNamed theme value for spacing, color, font, etc.
JITJust-in-time generation of only used utilities.
Modifier / variantPrefix such as hover:, md:, dark:.
PreflightTailwind’s base/reset styles.
Purge (legacy)Old name for removing unused CSS; replaced by content scan.
SafelistExplicit classes always included in the CSS output.
ThemeConfig object defining design scales.
UtilitySingle-purpose class mapping to one CSS declaration set.
@applyDirective to inline utilities inside custom CSS.
@layerPlaces custom CSS into base/components/utilities layers.

💡 Examples

Variant stack:

<button class="bg-zinc-900 hover:bg-zinc-700 md:px-6 dark:bg-zinc-100">
  OK
</button>

Safelist sketch:

export default {
  safelist: ["bg-red-500", "bg-green-500"],
};

⚠️ Pitfalls

  • Dynamic class construction often breaks scanning — prefer complete strings.
  • @apply can recreate the specificity fights utilities were meant to avoid.

On this page