--- id: JosiahSiegel/claude-plugin-marketplace/tailwindcss-responsive-darkmode version: "0c332fd3" license: MIT install: manual updated: 2026-06-18 --- # tailwindcss-responsive-darkmode — Learn to build dark mode interfaces using Tailwind's class-based and media-query strategies, plus responsive design patterns across mobile, tablet, and desktop. Covers system preference detection, runtime toggling, FOUC prevention, and container queries for component-level responsiveness. Publisher: JosiahSiegel · Stars: 49 · Updated: 2026-06-18 Install (manual): `git clone https://github.com/JosiahSiegel/claude-plugin-marketplace` ## SKILL.md # Tailwind CSS Responsive Design & Dark Mode (2025/2026) ## Responsive Design ### Mobile-First Approach (Industry Standard 2025/2026) Tailwind uses a mobile-first breakpoint system. With over 60% of global web traffic from mobile devices and Google's mobile-first indexing, this approach is essential. **Key Principle**: Unprefixed utilities apply to ALL screen sizes. Breakpoint prefixes apply at that size AND ABOVE. ```html
Responsive paragraph text
``` #### Responsive Spacing ```htmlContent
Primary text
Secondary text
Muted text
Smoothly scaling body text.
``` ### 2. Use Semantic Dark Mode Colors ```css @theme { /* Instead of raw colors, use semantic names */ --color-surface: oklch(1 0 0); --color-surface-dark: oklch(0.15 0 0); --color-on-surface: oklch(0.1 0 0); --color-on-surface-dark: oklch(0.95 0 0); } ``` ### 3. Test All Breakpoints Use the debug-screens plugin during development: ```bash npm install -D @tailwindcss/debug-screens ``` ```css @plugin "@tailwindcss/debug-screens"; ``` ### 4. Reduce Repetition with Components ```css /* components.css */ @layer components { .card { @apply bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm; } .section { @apply py-12 md:py-16 lg:py-24; } } ``` ### 5. Consider Color Contrast Ensure sufficient contrast in both light and dark modes (WCAG 2.2): - **Normal text**: 4.5:1 contrast ratio minimum - **Large text (18pt+)**: 3:1 contrast ratio minimum - **Interactive elements**: 3:1 against adjacent colors ```html ``` ### 6. Reduced Motion Preference Respect users who prefer reduced motion: ```html
```
### 8. Safe Area Handling (Notched Devices)
```css
@utility safe-area-pb {
padding-bottom: env(safe-area-inset-bottom);
}
```
```html
```
[View on SkillFed](https://skillfed.io/JosiahSiegel/claude-plugin-marketplace/tailwindcss-responsive-darkmode) · [View on GitHub](https://github.com/JosiahSiegel/claude-plugin-marketplace)