Skip to content
Back to skills

Tailwind Knowledge Patch

ASecurity

Tailwind CSS

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmentjavascriptjavarubyphpreactvuenextjsexpressgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill tailwind-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tailwind Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tailwind Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-tailwind-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-tailwind-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tailwind-knowledge-patch
description: Tailwind CSS
version: "4.3.5"
license: MIT
metadata:
  author: Nevaberry
---


# Tailwind CSS Knowledge Patch

Load this skill when configuring Tailwind CSS, choosing utilities or variants,
integrating build tools, or migrating and canonicalizing class lists.
Use the topic references for complete examples and behavior details.

## Reference index

| Reference | Topics |
| --- | --- |
| [Configuration and Theming](references/configuration.md) | Stylesheet aliases; theme namespaces; source registration, exclusions, and class detection; custom utilities |
| [Integrations and Ecosystem](references/integrations.md) | Vite, PostCSS, webpack, Rspack, Turbopack; CLI output and watching; WASM scanning; plugins; UI components and formatting |
| [Migration and Compatibility](references/migration.md) | Deprecated and invalid syntax; upgrade file handling; utility canonicalization; browser fallbacks and defaults |
| [Utilities](references/utilities.md) | 3D transforms; gradients and masks; shadows; logical layout; alignment; containers; typography; spacing; scrollbars and zoom |
| [Variants and States](references/variants.md) | Negated capability and container queries; selector support; variant composition and scopes; plugin base styles |

## Changed syntax and deprecations

Utilities with unsupported or empty extra slash modifiers emit no CSS. Use `stroke-2` in
place of `stroke-2/50` to keep the stroke width, and `bg-red-500/50` in place
of `bg-red-500/50/` to keep the background opacity.

Tailwind skips arbitrary property utilities whose values contain a top-level
`!`. Put the important modifier outside the brackets, as in `[color:red]!`.

Replace deprecated `start-*` and `end-*` with `inset-s-*` and `inset-e-*`,
respectively. The legacy utilities require a value suffix to generate CSS.
Use `inset-bs-*` and `inset-be-*` for block-start and block-end offsets.

See [Migration and Compatibility](references/migration.md) for legacy
canonicalization and upgrade behavior.

## Source registration and detection

`source()` paths are validated relative to the stylesheet that contains them,
including when that stylesheet is imported by another file.

- `@source` can scan an otherwise ignored dependency or a Git-ignored directory;
  binary file types under a registered path are still skipped.
- `@source not inline()` suppresses specific utilities even when source files
  contain them. `@source inline()` accepts whitespace around its quoted argument.
- A later `@source` can re-include a file excluded by an earlier `@source not`.
- Explicit globs can scan through symlinks. A trailing `**/*` keeps earlier
  wildcard segments in effect.
- A registration for a nested file remains scanned when a later registration
  points to a file in its parent directory.
- An explicit glob under `./templates/site/` scopes that registration to its
  matching files; sibling files or directories need another source to contribute.
- Automatic detection skips `.jj`, `.env`, and `.env.*` by default and follows
  allowlists in `.gitignore`.

Detection handles class names with an uppercase letter immediately followed by
a digit, dotted class names in MDX braces, Twig `addClass()` and `removeClass()`
literals, Template Toolkit delimiters, and Maud conditional shorthand. Ruby
comments are skipped; detection recognizes Ruby `%w` and `%W` word arrays with
angle brackets or custom delimiters, including in Slim and Haml.
See [Configuration and Theming](references/configuration.md).

## Theme configuration and lookups

With the CLI, Vite, or PostCSS, `@import`, `@reference`, `@plugin`, and `@config`
resolve `#` aliases from the `imports` field in `package.json`.

Tailwind preserves the case of theme keys supplied by JavaScript configs and
plugins: `brandBlue` can be used as `bg-brandBlue`. Set `ringColor.DEFAULT` in a
legacy JavaScript config to supply the color used by `ring` without a color utility.

| Theme setting | Effect |
| --- | --- |
| `--placeholder-color-*` | Defines custom colors for `placeholder-*` |
| `--perspective-*` | Generates matching `perspective-*` utilities |
| `--opacity-*` | Contributes suggestions for slash opacity modifiers |
| `theme('colors.foo')` | In a JavaScript plugin, returns the value of `--color-foo` when both `--color-foo` and `--color-foo-bar` exist |
| `theme('colors')` | In a JavaScript plugin or config, returns the full namespace object, including its `DEFAULT` entry when present |

The default color palettes include mauve, olive, mist, and taupe, usable with
color utilities such as `bg-mist-100` and `text-mauve-900`.

## Logical layout and alignment

| Task | Utilities or behavior |
| --- | --- |
| Block spacing and borders | `pbs-*`, `pbe-*`, `mbs-*`, `mbe-*`, `border-bs-*`, `border-be-*` |
| Block scroll spacing | `scroll-pbs-*`, `scroll-pbe-*`, `scroll-mbs-*`, `scroll-mbe-*` |
| Writing-mode sizing | `inline-*`, `min-inline-*`, `max-inline-*`, `block-*`, `min-block-*`, `max-block-*` |
| Last baseline for one flex or grid item | `self-baseline-last` |
| Safe alignment | Works in flex and grid; `justify-center-safe` falls back to start alignment when grid tracks overflow |
| Implicit grid tracks | `auto-rows-12` and `auto-cols-16` use 12 and 16 times the theme spacing unit |
| Fractional aspect ratios | Quarter-unit increments are accepted, as in `aspect-8.5/11` |
| Size containers | `@container-size` sets `container-type: size`; `@container-size/{name}` names the container |

Descendants of a size container can use `cqb` against its block size.
See [Utilities](references/utilities.md) for layout examples.

## Transforms, effects, and typography

Combine `rotate-z-*` with `rotate-x-*` on one element and use
`perspective-distant` on the parent to give the X-axis tilt visible depth.
Use `translate-z-*` for depth offsets and `scale-z-*` for depth scaling;
set `transform-3d` on the parent whose children should retain their depth.

`inset-shadow-*` and `inset-ring-*` stack with `shadow-*` and `ring-*`, giving
four box-shadow layers. With the default theme, `text-shadow-lg/50` has the
same effect as `text-shadow-lg text-shadow-black/50`. Named box, text, drop,
and inset shadow sizes accept fractional percentage slash modifiers.

Bracketed gradient modifiers accept the full interpolation clause, including
`in`, as in `bg-conic/[in_hsl_longer_hue]`. Edge masks (`mask-t-*`, `mask-r-*`,
`mask-b-*`, `mask-l-*`) can stack with radial and conic masks. Set radial mask
stop colors and positions separately; `mask-radial-at-right` moves the center
to the right edge.

Use `font-features-*` for OpenType features supported by the current font.
`tab-2` sets `tab-size: 2`; `tab-[12px]` sets a fixed tab width, and
`tab-(--tab-size)` reads a CSS variable. `text-[--spacing(5)]` sets font size
to five times the theme spacing unit. Units such as `dvmin`, `svi`, `cap`,
and `rex` are recognized as lengths without a `length:` hint.

`scrollbar-auto`, `scrollbar-thin`, and `scrollbar-none` set scrollbar width.
Use `scrollbar-thumb-*` and `scrollbar-track-*` together for colors, including
slash opacity; choose `scrollbar-gutter-auto`, `scrollbar-gutter-stable`, or
`scrollbar-gutter-both` for gutter reservation.

`zoom-125` sets `zoom: 125%`; use `zoom-[1.1]` for an arbitrary value or
`zoom-(--preview-zoom)` for a CSS variable.

## Variants and custom utilities

`not-hover:` applies outside `:hover` and also when `@media not (hover: hover)`
matches. `not-*` can also negate container queries, including `style()` queries.
`supports-[selector(a:not(.foo))]:flex` tests selector support; Tailwind preserves
`and`, `or`, and `not` inside the selector expression.

In CSS, `@variant hover:focus` requires both variants to match, while
`@variant hover, focus` applies declarations for each variant independently.
Use `@variant` inside a block-form `@custom-variant` to reuse an existing variant.

A custom variant containing `@scope` wraps generated utility rules in that
scope. Nested scope boundaries are preserved; declarations directly inside a
scope are wrapped in `:where(:scope)`.

`@variant` in a plugin's `addBase()` styles can use a custom variant declared
later in the stylesheet. See [Variants and States](references/variants.md).

Put `--default(...)` inside `--value(...)` or `--modifier(...)` to supply a value
when the class suffix or slash modifier is omitted:

```css
@utility code-tab-* {
  tab-size: --value(integer, --default(4));
}
```

This generates `code-tab` with a tab size of 4 and accepts `code-tab-2`.
Multi-token defaults retain their spaces. Separate functional `@utility`
definitions with the same name can handle different value types; each needs
a `--value(...)` call. See [Configuration and Theming](references/configuration.md).

## Build integrations and watch mode

- Upgrade `@tailwindcss/vite` to 4.2.2 to use it with Vite 8. The plugin resolves
  `@import` and `@plugin` through `resolve.alias`; relative paths resolve from
  the declaring stylesheet. Stylesheets using only `@variant` are processed.
- `@tailwindcss/vite` skips full page reloads for changes to server-only modules
  that client CSS scans, scanned files Vite processes but has not loaded as
  modules, and scanned sources Vite does not handle as modules, such as PHP templates.
- When PostCSS omits `from`, `@tailwindcss/postcss` resolves relative imports
  from its configured `base`. It rebuilds when a preprocessor changes the CSS
  passed to PostCSS even when the input file on disk stays the same.
- Install `@tailwindcss/webpack` for webpack; Rspack can be the sole bundler
  dependency. Use `@tailwindcss/turbopack` for Next.js and omit `as: '*.css'`
  from the loader rule so CSS Modules work.
- Use `--silent` to suppress CLI messages while writing compiled CSS, or
  `-o /dev/stdout` to write CSS to standard output.
- Use `--watch --poll` when filesystem events are unreliable or unavailable;
  `--poll=<ms>` sets the interval. One-off builds and polling watch builds work
  even when `@parcel/watcher` cannot load.
- CLI watch builds recover when deleted tracked dependencies are restored.
  Watch mode detects edits to registered symlinked files even when their real
  paths fall outside all scanned directories.
- Use 4.3.5 in WebContainers so the WASM scanner loads and detects changed
  and newly created files after the initial scan.

See [Integrations and Ecosystem](references/integrations.md) for remaining
resolution rules, platform behavior, and complete CLI commands.

## Canonicalization and upgrades

| Input | Canonical form or behavior |
| --- | --- |
| `text-sm leading-6` | `text-sm/6` |
| `w-1234 h-1234` | `size-1234` |
| `w-5 h-5 size-5` | `size-5` |
| `px-[1.2rem] py-[1.2rem]` | `p-[1.2rem]` |
| `-left-[9rem]` | `left-[-9rem]` |
| `overflow-ellipsis` | `text-ellipsis` |
| `[&:has(img)]:p-4` | `has-[img]:p-4` |
| `max-[64rem]:flex` | `max-lg:flex` with the default breakpoints |

Canonicalization preserves significant underscore-encoded whitespace and required
operator spacing in negated arbitrary values, units required for valid `calc()`
arithmetic, and original theme variables in shorthands. It preserves a `calc()`
division when folding would require a high-precision value.
`tailwindcss canonicalize` sends plugin logs to stderr so stdout contains
canonicalization results.

When migrating from v3 to v4, the upgrade tool uses the v3 `content` setting to
find files and skips Git-ignored files. HTML `style` attributes remain intact;
ignore rules are honored when running from a project subdirectory.
See [Migration and Compatibility](references/migration.md) for exact rewrites
and color-opacity precision rules.

## Components and formatting

Tailwind Plus plain HTML block examples include accessible interactive behavior
for projects without a React or Vue dependency. Headless UI v2.1 for React
supports sibling `Dialog` components. `prettier-plugin-tailwindcss` can remove
extra whitespace and duplicate classes while sorting class lists.

Files in this skill

  • SKILL.md9 KB
  • coverage.json934 B
  • references/configuration.md4.1 KB
  • references/integrations.md2.6 KB
  • references/migration.md2.2 KB
  • references/utilities.md5.6 KB
  • references/variants.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.