Responsive design

From Mindrally/skills · View interactive version

Responsive design is an AI agent skill from the GitHub repository Mindrally/skills. Comprehensive guidelines for responsive web design including mobile-first approach, flexible layouts, media queries, and cross-device optimization

How to use this skill

Skill file

Responsive Design Guidelines

Core Principles

Mobile-First Approach

Strategy

Benefits

/* 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

CSS Grid

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

Container Queries

Responsive Typography

Fluid Typography

h1 {
  font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
}

Units

Responsive Images

Srcset and Sizes

<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

Performance

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

Preference Queries

Touch Targets

Sizing

Interaction

Viewport Configuration

Meta Tag

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

Best Practices

Testing

Tools

Checklist

Performance Considerations

Critical CSS

Asset Optimization

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.