Element Queries allow changing the size of a HTML element based on the style of other elements. Element queries are similar to media queries, but are based on element size instead of browser or view-port size.
The Specification for CSS Element Queries describes how CSS Element Queries work
See the question Can media queries resize based on a div element instead of the screen? on Stack-overflow for more information about Element queries