install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/tailwind" ~/.claude/skills/comeonoliver-skillshub-tailwind && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/tailwind/SKILL.mdsource content
Community Tailwind CSS v4 Best Practices
Comprehensive performance optimization guide for Tailwind CSS v4 applications. Contains 44 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Configuring Tailwind CSS v4 build tooling (Vite plugin, PostCSS, CLI)
- Writing or migrating styles using v4's CSS-first approach
- Optimizing CSS bundle size and build performance
- Implementing responsive designs with breakpoints or container queries
- Setting up theming with @theme directive and design tokens
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Build Configuration | CRITICAL | |
| 2 | CSS Generation | CRITICAL | |
| 3 | Bundle Optimization | HIGH | |
| 4 | Utility Patterns | HIGH | |
| 5 | Component Architecture | MEDIUM-HIGH | |
| 6 | Theming & Design Tokens | MEDIUM | |
| 7 | Responsive & Adaptive | MEDIUM | |
| 8 | Animation & Transitions | LOW-MEDIUM | |
Quick Reference
1. Build Configuration (CRITICAL)
- Use Vite Plugin Over PostCSSbuild-vite-plugin
- Use CSS Import Over @tailwind Directivesbuild-css-import
- Leverage Automatic Content Detectionbuild-content-detection
- Use Node.js 20+ for Optimal Performancebuild-node-version
- Remove Redundant PostCSS Pluginsbuild-postcss-simplify
- Use Correct CLI Packagebuild-cli-package
2. CSS Generation (CRITICAL)
- Use CSS-First Configuration Over JavaScriptgen-css-first-config
- Avoid Excessive Theme Variablesgen-avoid-theme-bloat
- Use OKLCH Color Space for Vivid Colorsgen-oklch-colors
- Use @utility for Custom Utilitiesgen-utility-directive
- Use Dynamic Utility Valuesgen-dynamic-utilities
- Use Parentheses for CSS Variable Referencesgen-css-variable-syntax
3. Bundle Optimization (HIGH)
- Remove Built-in Pluginsbundle-remove-unused-plugins
- Avoid Sass/Less Preprocessorsbundle-avoid-preprocessors
- Enable CSS Minification in Productionbundle-css-minification
- Avoid Play CDN in Productionbundle-avoid-cdn-production
- Extract Critical CSS for Initial Renderbundle-split-critical-css
4. Utility Patterns (HIGH)
- Use Renamed Utility Classesutil-renamed-utilities
- Use Trailing Important Modifierutil-important-modifier
- Use Left-to-Right Variant Stackingutil-variant-stacking
- Use Explicit Border and Ring Colorsutil-explicit-colors
- Use Slash Opacity Modifierutil-opacity-modifier
- Use via-none to Reset Gradient Stopsutil-gradient-via-none
5. Component Architecture (MEDIUM-HIGH)
- Avoid Overusing @applycomp-avoid-apply-overuse
- Use @reference for CSS Module Integrationcomp-reference-directive
- Understand Utility File Scopecomp-utility-file-scope
- Leverage Smart Utility Sortingcomp-smart-sorting
- Customize Container with @utilitycomp-container-customize
- Use @custom-variant for Custom Variant Definitionscomp-custom-variant
6. Theming & Design Tokens (MEDIUM)
- Use Semantic Design Token Namestheme-semantic-tokens
- Use Class-Based Dark Mode for Controltheme-dark-mode-class
- Use Prefix for Variable Namespacingtheme-prefix-variables
- Leverage Runtime CSS Variablestheme-runtime-variables
- Set color-scheme for Native Dark Modetheme-color-scheme
- Use @theme inline and @theme static for Variable Controltheme-inline-static
7. Responsive & Adaptive (MEDIUM)
- Use Mobile-First Responsive Designresp-mobile-first
- Use Container Queries for Component-Level Responsivenessresp-container-queries
- Define Custom Breakpoints in @themeresp-custom-breakpoints
- Pair Hover with Active for Touch-Friendly Interactionsresp-hover-capability
- Use Logical Properties for RTL Supportresp-logical-properties
8. Animation & Transitions (LOW-MEDIUM)
- Use GPU-Accelerated Transform Propertiesanim-gpu-accelerated
- Use @starting-style for Entry Animationsanim-starting-style
- Use OKLCH Gradient Interpolationanim-gradient-interpolation
- Use Built-in 3D Transform Utilitiesanim-3d-transforms
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
Full Compiled Document
For a complete guide with all rules expanded, see AGENTS.md.
Reference Files
| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |