agentsclimarketplace

Css container queries

Skill goharabbas321/zeoel-framework/.agents/skills/zeoel/skills/css-container-queries

23-agent AI development team for Claude Code, Cursor, and Gemini CLI. Multi-agent orchestration framework with strict TDD, sprint planning, 420+ skills, and automated QA/security/SEO audits. Stop vibe-coding — start shipping production-grade software.

Install
npx -y skills add goharabbas321/zeoel-framework --skill css-container-queries

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

CSS Container Queries for component-level responsive design. Covers @container, container-type, container query units, and style queries.

SKILL.md

3.1 KB, 758 tokens by cl100k_base, as published. Nobody here has run it

CSS Container Queries

Overview

Container Queries allow components to adapt their styling based on the size of their containing element rather than the viewport. This enables truly reusable, context-aware components that respond to their available space.

When to Use

  • Building reusable components that work in different layout contexts
  • Card components that adapt between sidebar and main content
  • Design systems where components must be layout-agnostic
  • Replacing JavaScript-based resize observers for responsive components

Core Patterns

Basic Container Query

/* Define a containment context */
.card-container {
  container-type: inline-size;
  container-name: card;
}

/* Query the container's size */
@container card (min-width: 400px) {
  .card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
  }
}

@container card (max-width: 399px) {
  .card {
    display: flex;
    flex-direction: column;
  }
}

Container Query Units

/* cqw = 1% of container width */
/* cqh = 1% of container height */
/* cqi = 1% of container inline size */
/* cqb = 1% of container block size */
/* cqmin = min(cqi, cqb) */
/* cqmax = max(cqi, cqb) */

.card-title {
  font-size: clamp(1rem, 3cqi, 2rem);
}

.card-image {
  height: 40cqb;
}

Style Queries (Experimental)

/* Query custom property values */
@container style(--theme: dark) {
  .card {
    background: #1a1a2e;
    color: #eee;
  }
}

@container style(--variant: compact) {
  .card {
    padding: 0.5rem;
  }
}

Nested Containers

.sidebar {
  container-type: inline-size;
  container-name: sidebar;
}

.sidebar .widget {
  container-type: inline-size;
  container-name: widget;
}

@container sidebar (max-width: 300px) {
  .sidebar-nav { flex-direction: column; }
}

@container widget (min-width: 200px) {
  .widget-content { display: grid; grid-template-columns: 1fr 1fr; }
}

Tailwind CSS v4 Integration

<!-- Tailwind v4 has native container query support -->
<div class="@container">
  <div class="flex flex-col @sm:flex-row @md:grid @md:grid-cols-3">
    <p class="text-sm @lg:text-base">Responsive to container</p>
  </div>
</div>

Guidelines

  1. Use container-type: inline-size for most use cases (width-based queries)
  2. Name your containers with container-name for clarity in nested contexts
  3. Use container query units (cqi, cqw) for fluid typography and spacing
  4. Combine with @media — use container queries for components, media queries for layout
  5. Progressive enhancement — provide reasonable defaults for non-supporting browsers

Anti-Patterns

  • ❌ Using container-type: size when only inline-size is needed (causes unnecessary layout containment)
  • ❌ Nesting containers without naming them (ambiguous query targets)
  • ❌ Replacing all media queries with container queries (they serve different purposes)
  • ❌ Forgetting that container-type creates a new stacking context

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.