Toward Responsive Elements

In this piece Brian talks about the “Container Queries” problem, tries to shine some light on some misconceptions, and tells you about the state of things.

The crux of the idea is that there seems to be one ‘almost natural’ space that enables a ton of the use cases we’ve actually seen in research. Some community members have landed on not entirely dissimilar ideas: creating something of an ‘if’ via calc expressions to express different values for properties. The idea goes something like this:

Imagine that we added a function, let’s call it “switch” which allows you to express something “like a media query” with several possible values for a property. These would be based on the available-inline-width during the layout phase. Something like this…

An excerpt from Toward Responsive Elements

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.