Re: [csswg-drafts] [css-values] specification for calc() should be clearer about when the result has a percentage (#10017)

If they contain a percentage, I think they should be treated as containing a percentage, no matter how much nested into math functions it appears.

The exception should be e.g. `height: mix(25%; 0px; 100px)` where the `25%` is not treated as per `height` rules, it's basically equivalent to `height: calc(0.75 * 0px + 0.25 * 100px)` so no percentage.

@tabatkins You are mentioning types, but percentages in `height` just have a «[ "length" → 1 ]» type, with null percent hint. See https://drafts.csswg.org/css-values-4/#determine-the-type-of-a-calculation

> In all cases, the associated [percent hint](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-percent-hint) is null.

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


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

Received on Thursday, 29 February 2024 21:30:47 UTC