CSS Container Query Generator
Build a container query that responds to its parent's width, not the viewport — drag the box below to see it in action.
Advertisement
About this tool
Container queries let a component adapt to the size of its own container rather than the whole viewport — useful for a card or widget that gets reused at different widths across a page. Requires setting container-type on a parent element first, which this generator includes.