web-dev
Container Queries
Container Queries allow CSS styles to respond to the size of a parent container rather than the browser viewport, solving a long-standing limitation of media queries. By marking an element as a containment context with container-type, its children can use @container rules to adapt their layout based on the container's dimensions. This makes truly reusable components possible — a card component can rearrange itself whether it's in a sidebar or a full-width section.
#web-dev