CSS container queries are similar to media queries, but related to a container element size rather than the viewport size. While adaptive layouts o...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks to Una for suggesting to update my code example!
This is only one property change that makes the code much more human-readable:
For more details and other possible
container-typevalues, see:CSS Container Query Syntax Update 2022: container-type
Ingo Steinke ・ Aug 30 ・ 3 min read
Great post. I am wondering to find use cases of container-type: size; . since after we apply as size the element looses the height. I could not find any example on the purpose of using size.
Great article! For everyone who likes to see more code snippets and examples, here’s a good read about Container Queries (in German)