You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-conditional-5] How to resolve cq* values against a container size resolved at used value time? #14384
Container queries need to interleave layout and styling, thus width: min-content is a definite width by the time you get to resolving 10cqw in #element. So the height of #element is just a pixel value.
Height also resolves at used value time, and should just return the used value? (I'm not sure I understand your concern).
Correct. I should have used font-size: 10cqw instead of height: 10cqw, because the resolved value of font-size must be its computed value, which must be an absolute <length>.
My concern was that the spec says that cq* values "are evaluated based on the computed values of the query container". And the computed value of min-content for width is "as specified".
Container queries need to interleave layout and styling
Thanks for this clarification.
thus width: min-content is a definite width by the time you get to resolving 10cqw in #element. So the height of #element is just a pixel value.
To be clear, in Chrome 151 and Firefox ESR 140, the resolved height is 0px in my example. So I assume you are saying that the height of #element is expected to be that pixel value computed between style and layout.
I also assume it might be worth clarifying this in the spec, and so I am leaving this issue open.
My concern was that the spec says that cq* values "are evaluated based on the computed values of the query container". And the computed value of min-content for width is "as specified".
This should be "based on the used values" probably.
Activity
bfgeek commentedon Aug 24, 2026
Height also resolves at used value time, and should just return the used value? (I'm not sure I understand your concern).
https://drafts.csswg.org/cssom-1/#resolved-values
emilio commentedon Aug 24, 2026
Container queries need to interleave layout and styling, thus
width: min-contentis a definite width by the time you get to resolving10cqwin#element. So the height of#elementis just a pixel value.cdoublev commentedon Aug 25, 2026
Correct. I should have used
font-size: 10cqwinstead ofheight: 10cqw, because the resolved value offont-sizemust be its computed value, which must be an absolute<length>.My concern was that the spec says that
cq*values "are evaluated based on the computed values of the query container". And the computed value ofmin-contentforwidthis "as specified".Thanks for this clarification.
To be clear, in Chrome 151 and Firefox ESR 140, the resolved
heightis0pxin my example. So I assume you are saying that the height of#elementis expected to be that pixel value computed between style and layout.I also assume it might be worth clarifying this in the spec, and so I am leaving this issue open.
emilio commentedon Aug 25, 2026
This should be "based on the used values" probably.
Add support for resolving <length>
Add support for resolving <length>