CSS Container Queries: Components That Respond to Their Parent
Media queries respond to the viewport. Container queries respond to the parent element. This single difference unlocks truly reusable components that adapt to wherever they are placed — sidebars, grids, modals, anywhere.