agentleFS
MindrallyMindrally/skills/responsive-design/SKILL.md

responsive-design

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Comprehensive guidelines for responsive web design including mobile-first approach, flexible layouts, media queries, and cross-device optimization

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ui-ux-pro-max and frontend-design.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 4 projects that use this

  • VercelSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

39 rules. 0 are common, 26 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 26

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write semantic HTML to improve accessibility and SEO

    line 10
  2. Distinctive:

    Use CSS for styling, avoiding inline styles

    line 11
  3. Distinctive:

    Ensure responsive design using media queries and flexible layouts

    line 12
  4. Distinctive:

    Start with styles for the smallest viewport

    line 19
  5. Distinctive:

    Add complexity through progressive enhancement

    line 20
  6. Distinctive:

    Use for one-dimensional layouts (row or column)

    line 55
  7. Very specific:

    Use gap for consistent spacing

    line 57
  8. Distinctive:

    Use for two-dimensional layouts

    line 61
  9. Very specific:

    Use minmax() for flexible track sizing

    line 63
  10. Distinctive:

    Use for truly reusable components

    line 76
  11. Very specific:

    Use clamp() for responsive font sizes

    line 82
  12. Distinctive:

    Avoid text that's too small on mobile or too large on desktop

    line 84
  13. Very specific:

    Use rem for scalable typography

    line 93
  14. Very specific:

    Use em for component-relative sizing

    line 95
  15. Very specific:

    Avoid fixed px values for font sizes

    line 96
  16. Very specific:

    Use srcset for multiple image resolutions

    line 101
  17. Very specific:

    Use sizes to indicate display size at breakpoints

    line 102
  18. Distinctive:

    Use for art direction (different crops at different sizes)

    line 115
  19. Distinctive:

    Use media attributes for breakpoint-specific sources

    line 117
  20. Very specific:

    Use loading="lazy" for below-fold images

    line 121
  21. Very specific:

    Consider aspect-ratio CSS property

    line 122
  22. Very specific:

    Use @supports for feature detection

    line 148
  23. Distinctive:

    Test for specific CSS properties

    line 150
  24. Distinctive:

    Consider thumb reach zones on mobile

    line 162
  25. Distinctive:

    Don't rely solely on hover states

    line 165
  26. Very specific:

    Use @media (hover: hover) for hover-capable devices

    line 167
  27. Distinctive:

    Always include viewport meta tag

    line 177
  28. Very specific:

    Don't disable user scaling (avoid user-scalable=no)

    line 178
  29. Distinctive:

    Test with pinch-to-zoom enabled

    line 179
  30. Distinctive:

    Ensure content is usable at 200% zoom

    line 180
  31. Distinctive:

    Test at multiple viewport sizes

    line 191
  32. Distinctive:

    Test landscape and portrait orientations

    line 192
  33. Distinctive:

    Test with touch and mouse input

    line 193
  34. Distinctive:

    Test with keyboard navigation

    line 194
  35. Distinctive:

    Verify images load appropriate sizes

    line 195
  36. Distinctive:

    Verify touch targets are adequate

    line 197
  37. Distinctive:

    Test with browser zoom

    line 198
  38. Distinctive:

    Use modern formats (WebP, AVIF)

    line 209
  39. Distinctive:

    Consider responsive loading strategies

    line 211

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Responsive Design Guidelines

Core Principles

  • Write semantic HTML to improve accessibility and SEO
  • Use CSS for styling, avoiding inline styles
  • Ensure responsive design using media queries and flexible layouts
  • Prioritize accessibility by using ARIA roles and attributes
  • Design mobile-first, then enhance for larger screens

Mobile-First Approach

Strategy

  • Start with styles for the smallest viewport
  • Add complexity through progressive enhancement
  • Base styles work without media queries
  • Media queries add features for larger screens

Benefits

  • Forces prioritization of essential content
  • Improves performance on mobile devices
  • Ensures core functionality works everywhere
  • Reduces CSS complexity and specificity issues
/* Base styles for mobile */
.container {
  padding: 1rem;
}

/* Tablet and up */
@media (min-width: 768px) {
  .container {
    padding: 2rem;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
  }
}

Flexible Layouts

Flexbox

  • Use for one-dimensional layouts (row or column)
  • Leverage flex-wrap for responsive wrapping
  • Use gap for consistent spacing
  • Combine with media queries for layout changes

CSS Grid

  • Use for two-dimensional layouts
  • Leverage auto-fit and auto-fill for responsive grids
  • Use minmax() for flexible track sizing
  • Combine fr units with fixed minimums
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

Container Queries

  • Style components based on container size, not viewport
  • Use for truly reusable components
  • Define containers with container-type

Responsive Typography

Fluid Typography

  • Use clamp() for responsive font sizes
  • Set minimum, preferred, and maximum values
  • Avoid text that's too small on mobile or too large on desktop
h1 {
  font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
}

Units

  • Use rem for scalable typography
  • Base rem on user's browser settings
  • Use em for component-relative sizing
  • Avoid fixed px values for font sizes

Responsive Images

Srcset and Sizes

  • Use srcset for multiple image resolutions
  • Use sizes to indicate display size at breakpoints
  • Let browser choose optimal image
<img
  src="image-800.jpg"
  srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
  sizes="(max-width: 600px) 100vw, (max-width: 1000px) 50vw, 800px"
  alt="Description"
>

Picture Element

  • Use for art direction (different crops at different sizes)
  • Provide fallback with <img> element
  • Use media attributes for breakpoint-specific sources

Performance

  • Include width and height attributes to prevent layout shift
  • Use loading="lazy" for below-fold images
  • Consider aspect-ratio CSS property

Media Queries

Common Breakpoints

/* Small phones */
@media (min-width: 320px) { }

/* Large phones */
@media (min-width: 480px) { }

/* Tablets */
@media (min-width: 768px) { }

/* Laptops/Desktops */
@media (min-width: 1024px) { }

/* Large screens */
@media (min-width: 1280px) { }

/* Extra large screens */
@media (min-width: 1536px) { }

Feature Queries

  • Use @supports for feature detection
  • Provide fallbacks for unsupported features
  • Test for specific CSS properties

Preference Queries

  • prefers-color-scheme for dark/light mode
  • prefers-reduced-motion for animation preferences
  • prefers-contrast for contrast preferences

Touch Targets

Sizing

  • Minimum 44x44 pixels for touch targets
  • Provide adequate spacing between targets
  • Consider thumb reach zones on mobile

Interaction

  • Don't rely solely on hover states
  • Provide touch alternatives for hover interactions
  • Use @media (hover: hover) for hover-capable devices

Viewport Configuration

Meta Tag

<meta name="viewport" content="width=device-width, initial-scale=1">

Best Practices

  • Always include viewport meta tag
  • Don't disable user scaling (avoid user-scalable=no)
  • Test with pinch-to-zoom enabled
  • Ensure content is usable at 200% zoom

Testing

Tools

  • Browser DevTools device emulation
  • Real device testing when possible
  • Lighthouse for performance audits
  • W3C validators for code quality

Checklist

  • Test at multiple viewport sizes
  • Test landscape and portrait orientations
  • Test with touch and mouse input
  • Test with keyboard navigation
  • Verify images load appropriate sizes
  • Check typography readability
  • Verify touch targets are adequate
  • Test with browser zoom

Performance Considerations

Critical CSS

  • Inline critical above-fold CSS
  • Defer non-critical stylesheets
  • Minimize render-blocking resources

Asset Optimization

  • Compress images appropriately
  • Use modern formats (WebP, AVIF)
  • Lazy load below-fold content
  • Consider responsive loading strategies

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.