Tailwind CSS
Tailwind CSS is a CSS framework that builds styles from utility classes written in HTML or component templates. It supplies a shared design vocabulary for spacing, color, layout, and interaction states while leaving component behavior and page structure to your application.
itWeb development | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Tailwind CSS
Tailwind CSS turns small styling instructions in your HTML into a stylesheet. Its utilities, classes with focused styling purposes, describe spacing, color, layout, and other visual choices. Instead of inventing a new name for every box, you assemble the box from an existing vocabulary. The HTML gets longer; the naming committee gets less work.
The key distinction is when the work happens. A build adapter, the connection to a CLI or application build tool, reads your source files and generates CSS. The browser loads that result and follows ordinary CSS rules. Tailwind does not sit inside the page making layout decisions. The browser already has that job and has accumulated quite enough opinions about it.
A second idea is the variant, a prefix that applies a utility under a condition. A medium-width prefix changes a layout once the viewport is wide enough. A hover prefix follows pointer interaction. Visible-focus styling follows keyboard focus conditions. These prefixes decorate existing conditions; they do not create a working menu or decide whether a button is disabled. Appearance and behavior still need to agree.
Responsive styling begins with the unprefixed arrangement. Add changes for larger widths as the content needs them. The medium breakpoint is a width threshold, not an identification service for medium-sized devices. Container queries take a different measurement: the space around a component. A card in a sidebar therefore need not behave like the same card across a full page.
The third idea is the theme variable, a named CSS value that defines part of the utility vocabulary. A brand color can feed backgrounds, text, and borders through one token. Repeated values belong there. Repeated markup and behavior can belong in an application component. An exceptional width can stay an arbitrary value without being promoted into a company-wide design principle.
The compiler's surprising limitation is deliberate: it reads text, not your application's intentions. A class assembled from fragments may reach the browser with no matching CSS rule. Choose complete literal class names for known alternatives. If styling disappears, follow the path from loaded stylesheet to generated selector to matching condition to winning declaration. Moving the class later in HTML does not overrule that chain.
There is also Preflight, the base reset that changes element defaults. A heading remains a heading even when its default size disappears. Supply the typography you intend, and keep the semantics that users and assistive technology rely on. Utilities have not relieved anyone of contrast or keyboard checks.
This course uses version four, with CSS-first configuration and separate build integrations. Older version-three snippets deserve an upgrade-guide check before joining the party. Read the Intro for the full arrangement, the Cheatsheet for its vocabulary, and the Exercise to observe compilation, responsive layout, dark mode, and a missing rule you can repair.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://tailwindcss.com/docs/styling-with-utility-classes
Supports
- Utility composition
- Read the vocabulary and composition model before adding conditional styles.
- https://tailwindcss.com/docs/preflight
Supports
- Preflight reset
- Understand changed element defaults before diagnosing typography and list styling.
- https://tailwindcss.com/docs/installation/tailwind-cli
Supports
- CLI installation
- Reproduce the exercise build and stylesheet loading path.
- https://tailwindcss.com/docs/responsive-design
Supports
- Responsive design
- Study minimum-width variants and the separate container-query model.
- https://tailwindcss.com/docs/hover-focus-and-other-states
Supports
- State variants
- Connect pseudo-classes and group or peer relationships to rendered selectors.
- https://tailwindcss.com/docs/dark-mode
Supports
- Dark mode
- Choose between system preference and application-controlled dark selection.
- https://tailwindcss.com/docs/theme
Supports
- Theme variables
- Design reusable tokens and the utility namespaces they expose.
- https://tailwindcss.com/docs/detecting-classes-in-source-files
Supports
- Source detection
- Diagnose missed classes, external source paths, and explicit inclusion.
- https://tailwindcss.com/docs/adding-custom-styles
Supports
- Custom styles
- Extend utilities while keeping component and CSS boundaries understandable.
- https://tailwindcss.com/docs/compatibility
Supports
- Compatibility
- Check core browser requirements and separately processed style context.
- https://tailwindcss.com/docs/upgrade-guide
Supports
- Upgrade guide
- Review changed defaults and the v3 to v4 migration path after the build model is familiar.
- https://tailwindcss.com/docs/functions-and-directives
Supports
- Theme, source, apply, reference, custom variant and legacy config syntax
- https://tailwindcss.com/docs/installation/using-vite
Supports
- Dedicated Vite integration
- https://tailwindcss.com/docs/installation/using-postcss
Supports
- Dedicated PostCSS integration
- https://tailwindcss.com/docs/installation/play-cdn
Supports
- Development-only browser compiler
- https://github.com/tailwindlabs/tailwindcss
Supports
- Canonical implementation, Tailwind Labs maintenance and MIT license
- https://github.com/tailwindlabs/tailwindcss/releases
Supports
- Existing update-source registry, release history and exercise version
- https://github.com/sindresorhus/awesome
Supports
- Tailwind awesome-list discovery
- https://github.com/aniftyco/awesome-tailwindcss
Supports
- Discovery of Headless UI, Heroicons and the Prettier plugin
- https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
Supports
- Original maintainer discussion of utility composition and component extraction for Field Notes
- https://headlessui.com/
Supports
- React and Vue interaction component ecosystem destination
- https://heroicons.com/
Supports
- SVG artwork ecosystem destination
- https://github.com/tailwindlabs/headlessui
Supports
- Headless UI role, integration and licensing
- https://github.com/tailwindlabs/tailwindcss-intellisense
Supports
- Tailwind CSS IntelliSense role, integration and licensing
- https://github.com/tailwindlabs/prettier-plugin-tailwindcss
Supports
- Prettier plugin for Tailwind CSS role, integration and licensing
- https://v1.tailwindcss.com/docs/release-notes
Supports
- 2019 May 13: Stable v1 utility vocabulary
- The v1 release establishes a stable major-version foundation for utility-based styling. Its release notes document the initial compatibility boundary.
- https://tailwindcss.com/blog/introducing-tailwind-play
Supports
- 2020 Oct 7: Tailwind Play browser playground
- The official playground brings utility and configuration experiments into a browser-based editing environment.
- https://tailwindcss.com/blog/tailwindcss-v2
Supports
- 2020 Nov 18: Dark mode becomes a supported variant
- Version 2 adds dark-mode support and ring utilities, expanding the conditional styling vocabulary for application interfaces.
- https://tailwindcss.com/blog/just-in-time-the-next-generation-of-tailwind-css
Supports
- 2021 Mar 15: Just-in-time engine introduced
- An experimental compiler generates styles on demand from source usage, including arbitrary values. This changes how developers manage the available utility surface.
- https://tailwindcss.com/blog/tailwindcss-v3
Supports
- 2021 Dec 9: On-demand compilation becomes the default
- Version 3 adopts the just-in-time engine as the normal build path. Developers use arbitrary values without configuring a separate experimental mode.
- https://tailwindcss.com/blog/tailwindcss-v3-1
Supports
- 2022 Jun 7: Arbitrary variants extend selector conditions
- Version 3.1 introduces arbitrary variants, allowing one-off selector conditions alongside built-in variants.
- https://tailwindcss.com/blog/tailwindcss-v3-2
Supports
- 2022 Oct 19: Container queries enter the ecosystem
- Version 3.2 introduces an official container-query plugin, enabling component styling based on available container width.
- https://tailwindcss.com/blog/tailwindcss-v3-3
Supports
- 2023 Mar 28: Logical properties support writing directions
- Version 3.3 adds logical property utilities that support left-to-right and right-to-left layouts with a shared vocabulary.
- https://tailwindcss.com/blog/tailwindcss-v3-4
Supports
- 2023 Dec 19: Viewport and selector capabilities expand
- Version 3.4 adds dynamic viewport units, has variants, and subgrid utilities to the layout vocabulary.
- https://tailwindcss.com/blog/tailwindcss-v4
Supports
- 2025 Jan 21: CSS-first v4 build model
- Version 4 introduces CSS-first configuration, automatic source detection, and dedicated build integrations. Shared tokens become CSS theme variables.
