Skip to content
Codmaker
WebDesignCSS

CSS Container Queries are finally here

Responsive design is no longer about the viewport width. It's about the parent container context. How to use `@container` today.

Codmaker

Codmaker

Independent product lab

Published
6 min read
Share
CSS Container Queries are finally here

Component-owned responsiveness

A 'Card' component acts differently in a sidebar vs a main grid. Media queries forced us to care about the screen. Container queries let the component say 'If I have less than 300px, stack vertical'. This makes components truly portable.

Syntax basics

`container-type: inline-size` on the parent, and `@container (min-width: 400px)` on the child. It's that simple, and browser support is now green across major versions.

Share

Continue

Read more from the lab

45 engineering deep-dives on AI, n8n, mobile architecture, and the patterns we ship Codmaker's own products with.

Browse all articles
View all →