[email protected]

A set of rules for using Tailwind CSS 4.1, a CSS framework that styles interfaces through reusable utility classes. It describes current configuration, variables, custom utilities, variants, responsive behaviour, and removed features.

In plain words
What is it for?
Use it when writing Tailwind CSS, configuring themes, defining custom utilities, applying variants, or styling components in frameworks such as Vue or Svelte.
Why use it?
It helps prevent outdated Tailwind syntax and keeps CSS configuration and responsive styles consistent with version 4.1.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/cmnemoi/cursor-rules/3-tailwind-4.1
Clone the repo
git clone --depth 1 https://github.com/cmnemoi/cursor-rules

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 480 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00480
Opus 5 $0.00000 $0.00240
Sonnet 5 $0.00000 $0.00096
Haiku 4.5 $0.00000 $0.00048

Measured 2d ago against content hash 30e952e9a2a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

[email protected] scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

general-rules/.cursor/rules/03-frameworks-and-libraries/[email protected] · 63 lines

What it actually says

Configuration:

  • Use CSS-based configuration in tailwind.css.

CSS Variables:

  • Use CSS variables for theme values.
    • var(--color-red-500)
    • theme(colors.red.500)
  • Use CSS variable names for media queries.
    • theme(--breakpoint-xl)
    • theme(screens.xl)

Custom Utilities:

  • Register custom utilities with @utility.
@utility btn {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: ButtonFace;
}

Variants:

  • Apply variants left-to-right.
    • *:first:pt-0
    • first:*:pt-0
  • Use parentheses for arbitrary CSS variables.
    • bg-(--brand-color)
    • bg-[--brand-color]

Responsive Design:

  • Scope hover styles with @media (hover: hover).
  • Avoid hover for critical functionality.

Component Frameworks (Vue/Svelte/CSS Modules):

  • Import theme with @reference.
@reference "../../app.css";
  • Prefer direct CSS variables over @apply.
/* ✅ Preferred */
h1 { color: var(--text-red-500); }

/* ❌ Avoid when possible */
h1 { @apply text-red-500; }

Removed Features:

  • Avoid deprecated opacity utilities (bg-black/50).
    • bg-black/50
    • bg-opacity-50
  • Avoid @tailwind directives (@import "tailwindcss").
    • @import "tailwindcss"
    • @tailwind base
  • Avoid JS config features (corePlugins, etc.).
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 480 tokens per session scan A 30e952e9a2a3

Subscribe to this mod's changes

[email protected] is a cursor rule published in the GitHub repository cmnemoi/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 480 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.