Re: [csswg-drafts] [css-grid][css-flexbox][quirks] Avoid percentage height quirk in new layout models (#5545)

> Isn't it simpler to replace "if element is a not a block container" with "if element is a not a block box nor an inline-block"?
> This excludes flex-level and grid-level block containers.

I was originally thinking of something like that (amending step 4), but that won't help, because the algorithm can terminate before that and "choose" the flex container as the percent basis in step 3, if the flex container has a definite height.

I think:
(a) we need the algorithm to bail out *before step 3*, if it has landed on a grid/flex container (otherwise, step 3 could end up choosing that grid/flex container as the quirky percent-basis, to use for the descendant in question).
(b) we need to specify what element gets used as the containing block in that case.  (Right now the text says that you use the element that the algorithm returns, i.e. whatever ancestor you'd tunneled up to; but really, I think we want to use the nearest ancestor containing block for the percent-height element, or whatever we would've chosen in standards-mode.  And that nearest ancestor presumably will be indefinite height, which means the percent is unresolvable and treated as indefinite, which is OK.)

-- 
GitHub Notification of comment by dholbert
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5545#issuecomment-742028926 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 9 December 2020 20:28:19 UTC