W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2019

Re: [csswg-drafts] [css-values] Calc serialization of subtractions (#3335)

From: Eric Willigers via GitHub <sysbot+gh@w3.org>
Date: Wed, 31 Jul 2019 06:14:30 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-516712091-1564553669-sysbot+gh@w3.org>
We have percentages, then units in alphabetical order, then functions (min/max/clamp) in the order they were seen (with their arguments simplified using the same logic).

> there are some WPTs using something like`calc(100% + -200px)` and others using `calc(100% - 200px)`. These two inconsistent formats should be fixed. ;(

These should be `calc(100% - 200px)`

The serialization of `calc(70% - min(10%, 200px) + 30%)` should be `calc(100% - min(10%, 200px))`.

`calc(calc(1px + min(2em, 3ex)) - calc(max(5px, 6mm) - 7%) + 8px)` becomes
`calc(7% + 9px + min(2em, 3ex) - max(5px, 6mm))`.

This covers everything other than multiplication and division.


-- 
GitHub Notification of comment by ewilligers
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3335#issuecomment-516712091 using your GitHub account
Received on Wednesday, 31 July 2019 06:14:32 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:50 UTC