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-responsive-ui" ~/.claude/skills/comeonoliver-skillshub-tailwind-responsive-ui && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/tailwind-responsive-ui/SKILL.mdsource content
Community Responsive UI Tailwind CSS Best Practices
Comprehensive responsive transformation guide for Tailwind CSS applications, based on Refactoring UI by Adam Wathan & Steve Schoger and modern responsive design patterns. Contains 49 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Making an existing UI responsive across screen sizes
- Building new responsive layouts with Tailwind CSS
- Refactoring desktop-only interfaces for mobile support
- Reviewing responsive code for breakpoint, spacing, and typography issues
- Adapting navigation, forms, and data tables for touch devices
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Breakpoint Strategy | CRITICAL | |
| 2 | Layout Transformation | CRITICAL | |
| 3 | Responsive Spacing | HIGH | |
| 4 | Fluid Typography | HIGH | |
| 5 | Navigation Patterns | MEDIUM-HIGH | |
| 6 | Touch & Interaction | MEDIUM | |
| 7 | Responsive Media | MEDIUM | |
| 8 | Data Adaptation | LOW-MEDIUM | |
Quick Reference
1. Breakpoint Strategy (CRITICAL)
- Use Mobile-First Breakpoint Directionbp-mobile-first-default
- Set Breakpoints Where Content Breaksbp-content-driven-breakpoints
- Avoid Device-Specific Breakpoint Valuesbp-avoid-device-widths
- Consolidate Breakpoints to Three or Fourbp-consolidate-breakpoints
- Use min-width Over max-width for Breakpointsbp-min-width-over-max
- Use Visual Breakpoint Indicators During Developmentbp-debug-breakpoints
2. Layout Transformation (CRITICAL)
- Stack Elements on Mobile, Row on Desktoplayout-stack-to-row
- Collapse Sidebar to Top or Bottom on Mobilelayout-sidebar-collapse
- Reduce Grid Columns at Narrower Breakpointslayout-grid-column-reduction
- Use Responsive Holy Grail Layout with Gridlayout-holy-grail-responsive
- Convert Sticky Elements to Static on Mobilelayout-sticky-to-static
- Replace Fixed Positioning with Relative on Mobilelayout-fixed-to-relative
- Use Aspect Ratio for Responsive Containerslayout-aspect-ratio-containers
3. Responsive Spacing (HIGH)
- Scale Padding Independently Per Breakpointrspac-scale-padding-per-bp
- Use Responsive Gap for Grid and Flex Spacingrspac-responsive-gap
- Use Compact Spacing on Mobile, Generous on Desktoprspac-compact-mobile-generous-desktop
- Scale Section Dividers with Viewportrspac-section-spacing
- Convert Inline Spacing to Stack Spacing on Mobilerspac-inline-to-stack-spacing
- Use Responsive Container Paddingrspac-container-padding
4. Fluid Typography (HIGH)
- Use clamp() for Fluid Font Sizingfluid-clamp-font-size
- Tighten Line Height as Font Size Increasesfluid-responsive-line-height
- Constrain Line Length to 45-75 Charactersfluid-responsive-measure
- Scale Heading Sizes Independently Across Breakpointsfluid-scale-headings-independently
- Adjust Letter Spacing for Responsive Headlinesfluid-responsive-letter-spacing
- Use a Responsive Type Scalefluid-type-scale
5. Navigation Patterns (MEDIUM-HIGH)
- Collapse Horizontal Nav to Hamburger on Mobilenav-horizontal-to-hamburger
- Use Bottom Tab Bar for Primary Mobile Navigationnav-tab-bar-mobile
- Truncate Breadcrumbs on Mobilenav-breadcrumb-collapse
- Convert Sidebar Nav to Off-Canvas Drawer on Mobilenav-sidebar-drawer
- Expand Dropdown Menus to Full-Width on Mobilenav-dropdown-to-fullscreen
- Compact the Header on Scroll for Mobilenav-sticky-header-compact
6. Touch & Interaction (MEDIUM)
- Ensure Minimum 44px Touch Targets on Mobiletouch-min-touch-target
- Replace Hover Interactions with Tap-Friendly Alternativestouch-hover-to-tap
- Add Visual Swipe Affordances for Horizontal Scrollingtouch-swipe-affordance
- Use Scroll Snap for Carousel-Like Mobile Interfacestouch-scroll-snap-mobile
- Size Form Inputs to Prevent iOS Zoomtouch-input-sizing-mobile
- Use focus-visible for Touch-Friendly Focus Stylestouch-focus-visible-touch
7. Responsive Media (MEDIUM)
- Use Responsive Image Sizing with Object-Fitrmedia-responsive-images
- Maintain Video Aspect Ratio Across Breakpointsrmedia-video-aspect-ratio
- Scale Icons Per Breakpoint, Not with Font Sizermedia-icon-size-scaling
- Scale Avatar Sizes Per Context and Breakpointrmedia-avatar-responsive
- Swap Background Images at Breakpointsrmedia-background-image-bp
- Make Embedded Content Responsive with Container Constraintsrmedia-embed-responsive
8. Data Adaptation (LOW-MEDIUM)
- Transform Tables to Cards on Mobiledata-table-to-cards
- Use Horizontal Scroll for Dense Data Tablesdata-horizontal-scroll-table
- Adapt Data Grid Density for Screen Sizedata-responsive-data-grid
- Increase List Item Density on Mobiledata-list-density-mobile
- Truncate Overflowing Text on Mobiledata-truncate-overflow
- Stack Form Fields on Mobile, Use Grid on Desktopdata-responsive-form-layout
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
Reference Files
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |