W3C home > Mailing lists > Public > www-style@w3.org > November 2016

Re: [css-values] [css-color] XSL-FO and CSS - expression languages compared

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 17 Nov 2016 12:11:34 +0900
Cc: www-style@w3.org
Message-Id: <5272A7B3-9136-4315-9444-13EE5F254AE5@rivoal.net>
To: "Liam R. E. Quin" <liam@w3.org>

> On Nov 17, 2016, at 06:16, Liam R. E. Quin <liam@w3.org> wrote:
> (3) CSS calc() lacks the mod operator and the round() function --
> probably an easy addition. FO uses div instead of / for division but I
> don't consider that important. Similarly percentages are treated
> specially in CSS and not in FO - features in CSS but not FO don't in
> general pose a problem for moving to CSS from FO.


> (6) Functions and operators not in CSS calc()
> =============================================
> 6.1 numeric
> mod (operator)
> floor()
> ceiling()
> round()
> min(a, b) - seems better than using units like vmin/vmax
> max(a, b)
> abs()

I believe that allowing calc() to do non linear functions, and discontinuous functions in particular would make things like intrinsic sizing more complicated than they are now,
possibly allowing multiple solutions in some cases, so it is not obvious that this is actually an easy change to add, despite how obvious it looks at the syntax level. I think it is likely to be useful, but in the face of implementation difficulties, it is probably worth looking at specific use cases that would benefit from these, and see if we have other ways of addressing them in CSS. If not, then maybe we should bite the bullet and deal with the complexity.

Received on Thursday, 17 November 2016 03:12:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:05 UTC