Tailwind CSS Cursor Rules
April 15, 2026
Tailwind CSS Cursor Rules
Class Order
- Layout (position, display, z-index)
- Spacing (margin, padding)
- Sizing (width, height)
- Visual (colors, borders, shadows)
- Typography
- State (hover, focus, etc.)
Best Practices
- Use mobile-first (md:, lg:, xl:)
- Extract repeated patterns to components
- Use @apply sparingly
- Use arbitrary values when needed
- Use dark: variant for dark mode
AI Instructions
- Use shorthand classes
- Group related utilities
- Add custom colors in config first
Related Articles
Mobile Framework Cursor Rules for iOS and Android Development
Master cursor rules for React Native, Flutter, Swift, and Kotlin. Platform-specific best practices for efficient cross-platform and native mobile development.
Rust Cursor Rules: AI-Powered Development Best Practices
Cursor rules for Rust development enforcing ownership patterns, type safety, async/await practices, and clean code principles with AI assistance for production-ready code.