Re: [csswg-drafts] [css-sizing] how should inline-axis intrinsic sizing work for 'fit-content' and 'fit-content()'? (#3731)

Why not rely on https://drafts.csswg.org/css-sizing-3/#percentage-sizing ?

Like if you have `min-width: fit-content(calc(100px + 10%))`, resolve the percentage against zero and treat it as `fit-content(100px)`.

For `max-width: fit-content(calc(100px + 10%))` and non-replaced `width: fit-content(calc(100px + 10%))`, treat them as `initial`.

If I have an element with `width: 1000px` and an intrinsic size of 10px, I think it wouldn't be consistent to say that adding `max-width: min(max-content, max(min-content, 0%))` results in an max-content contribution of `1000px` according to [ยง5.1.a](https://drafts.csswg.org/css-sizing-3/#non-replaced-percentage-contribution), but that `max-width: fit-content(0%)` results in an intrinsic contribution of `10px` according to fantasai's proposal.

IMO `fit-content(arg)` should be a perfect synonym of `min(max-content, max(min-content, arg))`, though maybe this could be achieved by treating `min`/`max` differently than `calc` in https://drafts.csswg.org/css-sizing-3/#percentage-sizing

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

Received on Wednesday, 22 May 2019 11:36:04 UTC