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

Keywords can't be used inside the math functions: they only replace things like `<length-percentage>` with a function that effectively outputs a combination of length and percentage. Keywords, which aren't part of `<length-percentage>` but are a separate type of value, can't be used in such functions. See e.g. https://www.w3.org/TR/css-sizing-3/#preferred-size-properties which defines width as `auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)` and https://www.w3.org/TR/css-values-3/#calc-notation and https://drafts.csswg.org/css-values-4/#math which define the syntax of calc().

We agree it would be nice to allow calculations with keywords, but it's actually quite difficult because the keywords can map to rather complex behaviors. We'd like to be able to do that someday--it's been on our wishlist since `calc()` was first introduced--but it's not something we're ready to tackle yet.

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


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

Received on Sunday, 27 September 2020 17:54:29 UTC