Re: [csswg-drafts] using special values like max-content in functions (#5554)

> the keyword should be evaluated as if it were being applied directly on the property to determine what its output value should be, thus if for example max-content when used in a width property would return 250px then width width: calc(max-content - 25px) would end up being width: 225px.

I think that may be too simplistic. Keywords don't just "return" a length, they compute as-is and may be affected by other properties. For example, `with: auto` with `justify-self: stretch` may be different than with `justify-self: start`. In order to know the final value, we may have to perform an initial layout with just the keyword in order to find the used value, and then layout again with the full expression. The problem is that the used `width` value is influenced by `min/max-width`, but I don't think they should be taken into account when substituting the value of a keyword. So it needs to be defined carefully.

I think this can be more doable for `min-content` and `max-content`, but there are so many things depending on `width`/`height` computing to or behaving as `auto`, which make that case trickier.

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


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

Received on Monday, 28 September 2020 17:18:26 UTC