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
This means that the intrinsic min/max-content contributions of #b are 1000px.
But does this make sense? Once #b is laid out with a 1000px wide containing block, its size will resolve to 50px. It's normal for the intrinsic contributions to not match the final size, but here it looks weird since we know 50px will be an upper limit. Also, in #10721 there are 2 proposals under consideration, but both treat max-width: fit-content as max-content when computing the max-content contribution. So if we do that for fit-content, it seems we should do the same for a cyclic fit-content().
If a <length-percentage> with cyclic percentages is treated as 0px, then fit-content(<length-percentage>) with cyclic percentages is treated as fit-content(0px) i.e. min-content.
Note: the condition never holds in the spec, but it does in browsers.
If a <length-percentage> with cyclic percentages is treated as none, then fit-content(<length-percentage>) with cyclic percentages is treated as fit-content(calc(1px * infinity)) i.e. max-content.
If a <length-percentage> with cyclic percentages is treated as the automatic size, then fit-content(<length-percentage>) with cyclic percentages is treated as fit-content, i.e. min-content for the min-content contribution and max-content for the max-content contribution.
If a <length-percentage> with cyclic percentages is treated as the automatic minimum size, then fit-content(<length-percentage>) with cyclic percentages is treated as min-content.
Note: the condition never holds in the spec, and almost never holds in browsers.
According to https://drafts.csswg.org/css-sizing-3/#cyclic-percentage-contribution
This means that the intrinsic min/max-content contributions of
#bare1000px.But does this make sense? Once
#bis laid out with a1000pxwide containing block, its size will resolve to50px. It's normal for the intrinsic contributions to not match the final size, but here it looks weird since we know50pxwill be an upper limit. Also, in #10721 there are 2 proposals under consideration, but both treatmax-width: fit-contentasmax-contentwhen computing the max-content contribution. So if we do that forfit-content, it seems we should do the same for a cyclicfit-content().Then, proposal:
<length-percentage>would resolve cyclic percentages against zero, thenfit-content(<length-percentage>)resolves cyclic percentages against zero.Note: the condition never holds in browsers, but it does in the spec. See [css-sizing] Nobody follows the spec about cyclic percentages in min sizing properties #10969 and [css-sizing] Nobody follows the spec about cyclic percentages in preferred&max sizing properties of replaced element #11452.
<length-percentage>with cyclic percentages is treated as0px, thenfit-content(<length-percentage>)with cyclic percentages is treated asfit-content(0px)i.e.min-content.Note: the condition never holds in the spec, but it does in browsers.
<length-percentage>with cyclic percentages is treated asnone, thenfit-content(<length-percentage>)with cyclic percentages is treated asfit-content(calc(1px * infinity))i.e.max-content.<length-percentage>with cyclic percentages is treated as the automatic size, thenfit-content(<length-percentage>)with cyclic percentages is treated asfit-content, i.e.min-contentfor the min-content contribution andmax-contentfor the max-content contribution.<length-percentage>with cyclic percentages is treated as the automatic minimum size, thenfit-content(<length-percentage>)with cyclic percentages is treated asmin-content.Note: the condition never holds in the spec, and almost never holds in browsers.