Container queries

Media queries allow us to conditionally apply CSS based on global rules, for example based on the width of the user agent window. But sometimes we want to apply rules not just based on global size, but on local size, for example we want to change CSS rules if our parent container is below a certain size. This can be achieved with container queries.

Resources