Index of every page on this site: llms.txt
All skills
hairyf avatar

/tailwindcss

@ffa1f90
by Hairyhairyf/skills26 stars
5
Run it yourself

Tailwind CSS utility-first CSS framework. Use when styling web applications with utility classes, building responsive designs, or customizing design systems with theme variables.

Use this Skill: https://skilld.dev/gh/hairyf/skills/tailwindcss

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesfeatures-upgrade.md

≈655 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Upgrade Guide (v3 → v4)

Key changes when upgrading from Tailwind CSS v3 to v4. Use the automated upgrade tool when possible.

Upgrade Tool

npx @tailwindcss/upgrade

Requires Node.js 20+. Run in a new branch, review diff, test. Handles most migration automatically.

Installation Changes

  • PostCSS: Use @tailwindcss/postcss; remove postcss-import and autoprefixer (handled by v4)
  • Vite: Prefer @tailwindcss/vite over PostCSS
  • CLI: Use npx @tailwindcss/cli instead of npx tailwindcss

Import Change

/* v3 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* v4 */
@import "tailwindcss";

Renamed Utilities

v3 v4
shadow-sm shadow-xs
shadow shadow-sm
rounded-sm rounded-xs
rounded rounded-sm
blur-sm blur-xs
blur blur-sm
outline-none outline-hidden
ring ring-3

Removed / Replaced

  • bg-opacity-*, text-opacity-*, etc. → use bg-black/50, text-black/50
  • flex-shrink-* → shrink-*
  • flex-grow-* → grow-*
  • overflow-ellipsis → text-ellipsis

Important Modifier

<!-- v3: ! at start -->
<div class="!bg-red-500">

<!-- v4: ! at end -->
<div class="bg-red-500!">

Ring & Border Defaults

  • ring width: 3px → 1px; use ring-3 for v3 behavior
  • ring / border default color: currentColor (was gray-200 / blue-500)
  • Always specify color: ring-3 ring-blue-500, border border-gray-200

Other Breaking Changes

  • Space/divide selectors: Changed from :not([hidden]) ~ :not([hidden]) to :not(:last-child); may affect layout
  • Variant stacking: Left-to-right in v4 (was right-to-left)
  • Transform reset: transform-none no longer resets rotate/scale/translate; use scale-none, rotate-none, etc.
  • Hover on mobile: hover only applies when device supports hover; override with @custom-variant hover (&:hover) if needed
  • Arbitrary values: Use bg-(--var) not bg-[--var] for CSS variables
  • theme(): Use theme(--breakpoint-xl) not theme(screens.xl)
  • @layer utilities/components: Use @utility directive instead
  • corePlugins, safelist, separator: Not supported; use @source inline() for safelisting
  • Sass/Less/Stylus: v4 not designed for use with CSS preprocessors

Browser Support

v4 targets Safari 16.4+, Chrome 111+, Firefox 128+. For older browsers, stay on v3.4.

<!-- Source references: - https://tailwindcss.com/docs/upgrade-guide -->

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    A comprehensive reference skill for Tailwind CSS v4, containing only documentation and no executable scripts. It provides standard installation guides using official packages and well-known CDN services.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    45/45 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ffa1f90. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 10 months ago
Other metadata
metadata
{
  "author": "Hairyf",
  "version": "2026.2.2",
  "source": "Generated from https://github.com/tailwindlabs/tailwindcss.com, scripts located at https://github.com/hairyf/skills"
}
  • tailwindcss
  • css
  • utility-first
  • responsive-design
  • styling
  • theme-variables
  • dark-mode
  • web-development

README badge

README badge for hairyf/skills

Tailwind CSS v4 is a utility-first framework for styling web applications by composing design directly in markup using utility classes. Use this skill when building responsive designs, customizing theme variables with CSS-first configuration, or styling components with flexbox, grid, transforms, and effects utilities.

Generated from the current SKILL.md.

Does this skill cover Tailwind CSS v4?
Yes. The skill is based on Tailwind CSS v4.1.18, including v4's CSS-first configuration with theme variables and the @theme directive.
What setup methods does this skill document?
The skill covers Vite, PostCSS, CLI, and CDN installation paths. See the core-installation reference.
Does this skill include dark mode guidance?
Yes. The skill documents dark mode implementation using the dark variant and custom strategies.
Does this skill help migrate from Tailwind v3 to v4?
Yes. The features-upgrade reference covers breaking changes and rename mappings for upgrading from v3 to v4.
What topics does this skill not cover?
The skill focuses on core Tailwind utilities and configuration. It does not cover third-party plugins or integration with specific JavaScript frameworks beyond general markup styling.

Generated from the current SKILL.md. These answers refresh after source changes.