Responsive design

From oyi77/1ai-skills · View interactive version

Responsive design is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when mobile-first responsive design — breakpoints, fluid typography, container queries, and touch optimization.

How to use this skill

Skill file

Overview

Responsive design that works across all devices. Covers mobile-first approach, breakpoint strategy, fluid typography, container queries, touch targets, and performance optimization.

Capabilities

When to Use

Trigger phrases:

When NOT to Use

Pseudo Code

The responsive-design workflow follows a standard pipeline pattern.

Core flow:

# responsive-design primary flow
input = prepare(raw_data)
result = process(input, config={breakpoints, container, design, first, fluid})
validate(result)
deliver(result)

Error handling:

on error:
  log(error_details)
  retry_with_backoff(max=3)
  if still_failing: alert_and_escalate()

Core Workflow

# responsive-design primary flow
input = prepare(raw_data)
result = process(input, config={breakpoints, container, design, first, fluid})
validate(result)
deliver(result)

Error Handling

on error:
  log(error_details)
  retry_with_backoff(max=3)
  if still_failing: alert_and_escalate()

Modern CSS Platform Rules

Prefer native CSS primitives before JavaScript observers or viewport glue:

/* Component adapts to its container, not the viewport */
.card-grid { container-type: inline-size; }
@container (min-width: 42rem) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* Native validation after user interaction */
input:user-invalid { border-color: var(--color-danger); }

Responsive Verification

Mobile-First CSS

/* Mobile first (default) */
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* Tablet */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

Fluid Typography

h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
body { font-size: clamp(1rem, 2vw, 1.125rem); }

Container Queries

.card-container { container-type: inline-size; }
@container (min-width: 400px) {
  .card { display: flex; gap: 1rem; }
}

Common Patterns

How to Use

  1. Define content goal (traffic, engagement, conversion, brand awareness)
  2. Research target audience pain points and search intent
  3. Generate content using appropriate AI tools
  4. Edit and humanize output for authenticity
  5. Optimize for target platform (SEO, hashtags, format)
  6. Schedule and distribute across channels
  7. Measure performance and iterate

Red Flags

Verification

Process

  1. Analyze the task requirements
  2. Apply domain expertise
  3. Verify output quality

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |

| "I will optimize later" | SEO and distribution need optimization from the start. |

| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |

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.