Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Responsive & Fluid Layout — Container Queries, clamp()

    1

    Build modern, fluid web layouts using container queries, intrinsic grids, and clamp-based typography.

    Free

    1 useSecurity scanned
    Responsive & Fluid Layout — Container Queries, clamp()

    Responsive & Fluid Layout — Container Queries, clamp()

    Example session with this skill installed

    Create a responsive 3-column pricing section that works on mobile and uses a fluid typography scale.

    • Read your context and instructions
    • Compiled the responsive & fluid

    I have generated a responsive pricing section using fluid typography and an intrinsic grid layout. This implementation uses clamp() for scaling and container-type for component-level responsiveness.

    Fluid Pricing Section

    :root {
      /* Fluid Scale: 1rem at 360px -> 1.13rem at 1440px */
      --step-0: clamp(1rem, .96rem + .19vw, 1.13rem);
      --step-2: clamp(1.44rem, 1.30rem + .65vw, 2rem);
      --space-m: clamp(1.5rem, 1.39rem + .56vw, 2rem);
      --space-l: clamp(2.5rem, 2.17rem + 1.67vw, 4rem);
    }
    
    .pricing-container {
      width: min(100% - 2rem, 80rem);
      margin-inline: auto;
      padding-block: var(--space-l);
      container-type: inline-size;
    }
    
    .pricing-grid {
      display: grid;
      gap: var(--space-m);
      /* Intrinsic layout: wraps automatically at ~20rem */
      grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    }
    
    .card {
      padding: var(--space-m);
      border: 1px solid #ddd;
      display: flex;
      flex-direction: column;
      gap: var(--step-0);
    }
    
    .card h2 {
      font-size: var(--step-2);
      margin: 0;
    }
    
    /* Specific layout shift for wide cards using container queries */
    @container (min-width: 40rem) {
      .card--featured {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
      }
    }
    
    <section class="pricing-container">
      <div class="pricing-grid">
        <div class="card">
          <h2>Starter</h2>
          <p>Basic features for small teams.</p>
          <button>Get Started</button>
        </div>
        <div class="card card--featured">
          <div>
            <h2>Pro</h2>
            <p>Advanced tools for growing businesses.</p>
          </div>
          <button>Upgrade Now</button>
        </div>
        <div class="card">
          <h2>Enterprise</h2>
          <p>Custom solutions for large scale.</p>
          <button>Contact Sales</button>
        </div>
      </div>
    </section>
    

    Next steps

    1. Add viewport-fit=cover to your meta tag to handle mobile notches.
    2. Review the auto-fit minimum width to match your specific content needs.
    3. Test the layout at 200% zoom to ensure text does not overflow containers.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Maintaining separate codebases for mobile and desktop is a maintenance debt trap. This skill builds layouts that adapt to their containers using modern CSS, reducing the need for fragile media queries and device-specific breakpoints.

    What it does

    • Fluid scaling implements type and spacing scales using clamp() formulas that interpolate between 360px and 1440px.
    • Intrinsic grids creates layouts using auto-fit and minmax that reflow naturally without manual breakpoint triggers.
    • Container queries builds components that change layout based on their parent width rather than the browser viewport.
    • Logical properties applies inline and block spacing to ensure layouts support right-to-left (RTL) languages automatically.
    • Safe area handling manages mobile-specific constraints like the notch and dynamic viewport units to prevent layout jumps.

    How it works

    1. Mobile-first start defines the core layout at a 320px single-column width to ensure no horizontal overflow.
    2. Token injection generates a fluid scale of CSS variables for typography and spacing.
    3. Component definition applies container-type properties to wrappers for localized responsiveness.
    4. Final audit verifies the layout against 200% browser zoom and various viewport heights (svh).

    Frameworks & tools

    Modern CSS (Level 4+), Tailwind CSS v4, HTML5, and browser-native Web APIs. Works with any frontend framework including React, Vue, Svelte, or vanilla HTML.

    Why this beats prompting it yourself

    Standard prompts often default to deprecated 100vh units that break on mobile browsers or excessive media queries that are hard to maintain. This skill enforces accessibility standards like WCAG 1.4.4 and uses container queries to make components truly portable across different page regions.

    Use cases

    • Responsive dashboards where widgets need to reflow when sidebars are toggled.
    • Fluid marketing sites that require consistent typography scales across all screen sizes.
    • Mobile web apps that must handle notch safe areas and dynamic URL bar resizing.
    • Multilingual sites requiring automatic layout flipping for RTL support.

    Known limitations

    Requires modern browser support for container queries and logical properties. It does not provide fallbacks for legacy browsers like IE11.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.

    Requires browsers supporting CSS container queries and clamp(). Does not include legacy polyfills or IE11 fallbacks.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed1 day ago

    What's inside

    Frequently Asked Questions

    Unlike standard prompts that rely on viewport-wide media queries, this skill uses Container Queries and intrinsic grids so your components intelligently adapt to the specific section of the page they are placed in.

    This skill generates standards-compliant CSS (Level 4+), Tailwind CSS v4 configurations, and HTML5 structures that are compatible with any modern frontend framework like React, Vue, or Svelte.

    Yes, it utilizes logical properties (inline/block) instead of physical ones (left/right), ensuring your layouts automatically flip and scale correctly for right-to-left (RTL) languages.

    The skill focuses on modern browser standards; while it works perfectly on all current versions of Chrome, Safari, Edge, and Firefox, it does not provide legacy fallbacks for outdated browsers like IE11.

    You receive a comprehensive implementation kit including fluid scaling tokens, container-aware component structures, and a layout audit to ensure 200% zoom and mobile safe-area compliance.

    New in Frontend & Web Apps

    Free