Re: [csswg-drafts] [css-sizing] clarification around Compressible Replaced Elements and min-content size (#5665)

> However, the semi-replaced elements do not have a 0 min-content contribution when they have a percent max-width, even though 5.2.1c should apply to an element with % width or % max-width. Firefox 86 matched Blink wrt % max-width here, so we equally ignore that part of the spec ... I don't think we should expand compressibility to include elements with a % max-width, because that would cause some elements on existing pages to get size 0 and completely disappear, which is a severe failure mode.

Wrt difference in behavior for % width vs % max-width, see https://github.com/w3c/csswg-drafts/issues/765 particularly comment https://github.com/w3c/csswg-drafts/issues/765#issuecomment-282113836 ; we'd resolved to try to make replaced and semi-replaced elements behave the same (if possible), which is why the spec treats them the same even though implementations don't yet. [ Mozilla has a bug open at https://bugzilla.mozilla.org/show_bug.cgi?id=1388840 ; looks like @davidbaron had patches but never submitted... ] If that's no longer considered likely to be Web-compatible, then we'll have to re-examine the issue and make replaced/semi-replaced elements inconsistent in the spec as well. :/

testcase with INPUT: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=9112
testcase with IMG: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=9113

> Blink makes the min-content contribution of these semi-replaced elements 0 when they have a percent width, even if the percent width could resolve against its definite containing block.

Do you think we can change this so that semi-replaced elements resolve their percent widths against a definite containing block just like replaced elements do?

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


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

Received on Thursday, 25 March 2021 21:24:55 UTC