Re: [csswg-drafts] [css-values][css-images] Unit algebra with `<flex>` in `stripes()` leads to a contradiction (#9667)

> That refers to `calc(1fr + 1px)`, which is effectively invalid.

And so is `calc(1fr / 1fr * 50px)`. The definition basically says that `<flex>` values cannot be used in `calc()` expressions.

The contradictory is rather that [CSS Values 4 says that `<flex>` values _can_ be represented in `calc()`](https://drafts.csswg.org/css-values-4/#math).

Also, why is this specific to the `stripes()` function? Doesn't this issue also apply to Grid then? I.e. `grid-template-columns: 50px calc(1fr / 1fr * 50px) 1fr;` with a 100px wide element.

> and in `2fr / 1fr * 1px` the type is `{flex: 0, length: 1}`, which'll successfully match.

@tabatkins So you suggest the result of the example to be `50px, 50px, 0` due to the two `fr` units cancelling each other out?

Sebastian

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


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

Received on Friday, 8 December 2023 22:33:29 UTC