Responsive Design logo

Responsive Design

Community
lotfb86
responsive-design

Responsive web design sub-skill. Provides mobile-first layout patterns, CSS Grid/Flexbox strategies, responsive images, fluid typography, container queries, and breakpoint systems. Pull this in whenever building or reviewing UI that must work across mobile, tablet, desktop, and large screens. Triggers on: "make it responsive", "responsive design", "mobile-first", "breakpoints", "fluid layout", or any request involving cross-device layout.

Overview

Publisherlotfb86
Repositoryweb-design-skills
Skill nameresponsive-design
Stars
20
Forks
7
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by lotfb86 on GitHub. Read the source before you install it.

Installation

Install the Responsive Design AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lotfb86/web-design-skills/tree/main/02-responsive-design
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lotfb86/web-design-skills.git /tmp/web-design-skills
mkdir -p .claude/skills
cp -r /tmp/web-design-skills/02-responsive-design .claude/skills/responsive-design
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Responsive Design in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Responsive Design on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Responsive Design is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Responsive Design

Comprehensive responsive web design patterns for building layouts that adapt seamlessly across all device types and screen sizes. This is a sub-skill — pull it into any design or build workflow that needs cross-device support.

When to Use This Skill

  • Building any new page or component that must work on mobile + desktop
  • Reviewing or fixing responsive layout issues
  • Converting a fixed-width design to responsive
  • Setting up a breakpoint system for a new project
  • Optimizing images and typography for multiple viewports

Standard Breakpoint System

Use these as the default breakpoints unless the project specifies otherwise:

css
:root {
  --breakpoint-sm: 640px;   /* Large phones */
  --breakpoint-md: 768px;   /* Tablets */
  --breakpoint-lg: 1024px;  /* Small desktops */
  --breakpoint-xl: 1280px;  /* Desktops */
  --breakpoint-2xl: 1536px; /* Large screens */
}

Tailwind equivalents: sm:, md:, lg:, xl:, 2xl:

Step 1: Mobile-First Approach

ALWAYS design starting from the smallest screen (320px+) and progressively enhance for larger viewports.

css
/* Base styles = mobile (no media query needed) */
.container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

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

Rules:

  • MUST use min-width media queries (mobile-first), NOT max-width
  • MUST include <meta name="viewport" content="width=device-width, initial-scale=1"> in HTML
  • MUST use relative units (rem, em, %, vw, vh) — NOT fixed px for layout widths
  • MUST NOT set fixed widths like width: 1200px — use max-width instead

Step 2: Layout Patterns

Flexbox — Use for 1-dimensional layouts

Responsive navigation:

css
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

Card row that wraps:

css
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card {
  flex: 1 1 100%;           /* Full width on mobile */
}

@media (min-width: 768px) {
  .card { flex: 1 1 45%; }  /* 2 columns on tablet */
}

@media (min-width: 1024px) {
  .card { flex: 1 1 30%; }  /* 3 columns on desktop */
}

CSS Grid — Use for 2-dimensional layouts

Auto-responsive grid (no media queries needed):

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

Dashboard layout with sidebar:

css
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard {
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
  }
}

@media (min-width: 1280px) {
  .dashboard {
    grid-template-columns: 280px 1fr 300px;
  }
}

Decision Guide

Use CaseUse
Nav bar, button group, toolbarFlexbox
Card grid, gallery, product listGrid (auto-fit)
Full page layout with sidebarGrid (explicit columns)
Centering a single elementFlexbox
Complex 2D dashboardGrid

Step 3: Responsive Images

srcset for resolution switching:

html
<img
  src="image-800.jpg"
  srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
  sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
  alt="Descriptive alt text"
  loading="lazy"
  decoding="async"
/>

Art direction with <picture>:

html
<picture>
  <source media="(min-width: 1024px)" srcset="hero-wide.webp" type="image/webp" />
  <source media="(min-width: 768px)" srcset="hero-medium.webp" type="image/webp" />
  <img src="hero-mobile.jpg" alt="Hero image" loading="lazy" />
</picture>

Rules:

  • MUST include loading="lazy" on below-the-fold images
  • MUST include meaningful alt text
  • MUST provide WebP/AVIF formats when possible
  • MUST size images appropriately — don't serve 2000px images to mobile
  • Use Astro <Image> component when in Astro projects (handles optimization automatically)

Step 4: Fluid Typography

Use clamp() for typography that scales smoothly without breakpoints:

css
:root {
  /* clamp(min, preferred, max) */
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
  --text-2xl: clamp(1.875rem, 1.2rem + 2.5vw, 3rem);
  --text-3xl: clamp(2.25rem, 1.5rem + 3vw, 4rem);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p  { font-size: var(--text-base); }

Rules:

  • MUST use clamp() or relative units for font sizes — NOT fixed px
  • Minimum readable body text: 16px (1rem)
  • Line height should scale inversely: larger text = tighter line-height
  • Touch targets: minimum 44px height on interactive elements

Step 5: Container Queries (Modern CSS)

For component-level responsiveness independent of viewport:

css
.card-container {
  container-type: inline-size;
  container-name: card;
}

.card {
  display: flex;
  flex-direction: column;
}

@container card (min-width: 400px) {
  .card {
    flex-direction: row;
    align-items: center;
  }
}

@container card (min-width: 600px) {
  .card {
    gap: 2rem;
  }
  .card-image {
    flex: 0 0 40%;
  }
}

When to use:

  • Reusable components that live in different layout contexts (sidebar vs. main content)
  • Design system components that need intrinsic responsiveness
  • Widget/card patterns that should adapt to their container, not the viewport

Browser support: All modern browsers. Safe to use in 2025+ projects.

Step 6: Common Responsive Patterns

Show/Hide Elements

css
.mobile-menu { display: block; }
.desktop-nav { display: none; }

@media (min-width: 768px) {
  .mobile-menu { display: none; }
  .desktop-nav { display: flex; }
}

Responsive Spacing

css
.section {
  padding: clamp(2rem, 5vw, 6rem) clamp(1rem, 3vw, 4rem);
}

Responsive Table → Card Pattern

css
/* On mobile, transform table rows into stacked cards */
@media (max-width: 767px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead { display: none; }
  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
  }
}

Constraints — Hard Rules

RuleDetails
MUSTInclude viewport meta tag in all HTML documents
MUSTUse mobile-first (min-width) media queries
MUSTUse relative units for layout (rem, %, vw)
MUSTTest at exact breakpoints: 320, 768, 1024, 1280, 1536
MUSTEnsure touch targets are at least 44px
MUST NOTUse fixed widths (width: 1200px) — use max-width
MUST NOTDuplicate base styles across all breakpoints (DRY)
MUST NOTUse device-specific breakpoints (e.g., "iPhone 14")
MUST NOTHide essential content on mobile — restructure instead

Testing Checklist

Before considering any responsive implementation complete:

  • Renders correctly at 320px width (smallest common mobile)
  • Renders correctly at 768px (tablet portrait)
  • Renders correctly at 1024px (tablet landscape / small desktop)
  • Renders correctly at 1280px (standard desktop)
  • Renders correctly at 1536px+ (large screens)
  • No horizontal scrollbar at any viewport
  • Touch targets are at least 44px on mobile
  • Images scale appropriately and don't overflow
  • Text remains readable at all sizes (min 16px body)
  • Navigation is accessible on all viewports
  • Forms are usable on mobile (proper input types, sizing)

Tailwind CSS Quick Reference

When using Tailwind (v3 or v4), apply responsive prefixes:

html
<!-- Stack on mobile, row on tablet, 3-col grid on desktop -->
<div class="flex flex-col md:flex-row lg:grid lg:grid-cols-3 gap-4 md:gap-6 lg:gap-8">
  <div class="w-full md:w-1/2 lg:w-auto">...</div>
</div>

<!-- Fluid text -->
<h1 class="text-2xl md:text-4xl lg:text-5xl">Heading</h1>

<!-- Responsive padding -->
<section class="px-4 py-8 md:px-8 md:py-12 lg:px-16 lg:py-20">...</section>

<!-- Hide/show -->
<nav class="hidden md:flex">Desktop Nav</nav>
<button class="md:hidden">Menu</button>

Integration with Other Skills

This skill works as a sub-skill for:

  • frontend-design — pull in when building any UI component
  • local-business-rebuild — all prospect sites must be fully responsive
  • website-rebuild — responsive is a core requirement
  • prospect-qa — use the testing checklist during QA reviews

Frequently asked questions

What does the Responsive Design AI skill do?

Responsive web design sub-skill. Provides mobile-first layout patterns, CSS Grid/Flexbox strategies, responsive images, fluid typography, container queries, and breakpoint systems. Pull this in whenever building or reviewing UI that must work across mobile, tablet, desktop, and large screens. Triggers on: "make it responsive", "responsive design", "mobile-first", "breakpoints", "fluid layout", or any request involving cross-device layout.

Why use Responsive Design on TypingMind?

Because you install it once and use it with any model. Responsive Design is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Responsive Design in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lotfb86/web-design-skills/tree/main/02-responsive-design. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Responsive Design?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Responsive Design?

As many as you like. As long as a model supports skills, you can use Responsive Design with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Responsive Design AI skill free?

It is published on GitHub by lotfb86. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇