Container Queries allow authors to style elements according to the size of a container. This is similar to a @media query, except that it evaluates against a container instead of the viewport.
The plan for the prototype is to use Miriam's proposed alternative, i.e. containers will be marked with "contain: size", and a new at-rule "@container (min-width: 100px) { ... }" specifies the rules that apply given the size of the container. This is not at all finalized, but the underlying problems we need to solve in Blink are (mostly) the same regardless of how the feature is accessed, so we'll for now use this proposal as the temporary syntax.
One thing to note about container queries is that it requires interleaving style calculation and layout. That is, we can no longer fully calculate the style for everything, and then afterwards do layout, since container queries allow the style to depend on the layout of a container. How feasible/complex this is to implement in Blink is unclear at this point, and is a key part of what we need to figure out during prototyping.
Top requested "missing feature" from CSS.
None
Yes
This is exciting!Will this prototype look at size containment along a single axis (as mentioned in dbaron's proposal)? If our intention is to require a fixed size across both axes, I'm not sure we can say that developers are positive about it. My gut feeling is that most developers are only interested in this feature if they still get layout flow in one axis.
This is exciting!Will this prototype look at size containment along a single axis (as mentioned in dbaron's proposal)? If our intention is to require a fixed size across both axes, I'm not sure we can say that developers are positive about it. My gut feeling is that most developers are only interested in this feature if they still get layout flow in one axis.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKFBnUoAku0Nwpi1F%2BYE5vV8D5XN6%3DmqK1TLSEa7PHQzdrjQ9Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADizRgZoW-_4LxdJYs9wEuAw0EUS35DEAzV%3DDBXLK0n8cwHabw%40mail.gmail.com.