Why it matters
Media queries respond to the screen; container queries respond to the space a component actually has. A card can switch to a two-column layout when its sidebar slot is wide enough, wherever it is placed.
This builder writes the containment and the queries together and lets you test a width, so you can see which rules will apply before you try it in the browser.
How to use it
- Type or paste your input; the example shows the format.
- Press Build CSS. Results also update as you type.
- Read the summary line, then the table, notes or output below it.
- Copy or download what you need. Nothing leaves this page.
FAQ
Why doesn't my container query work?
The query applies to descendants of an element with container-type set. You can't style the container itself from its own query, and size containment needs an explicit height.
Is my input uploaded?
No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.
Can I rely on the result?
It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.