CSS container queries

Container queries enable you to apply styles to an element based on the size of the elements container. If, for example, a container has less space available in the surrounding context, you can hide certain elements or use smaller fonts. Container queries are an alternative to media queries, which apply styles to elements based on viewport size or other device characteristics.

@scope

Level 2 of the CSS Grid Layout specification includes a subgrid value for grid-template-columns and grid-template-rows.

@scope

@container

Level 2 of the CSS Grid Layout specification includes a subgrid value for grid-template-columns and grid-template-rows.

@container

Server components

Level 2 of the CSS Grid Layout specification includes a subgrid value for grid-template-columns and grid-template-rows.

Server components