W3C home > Mailing lists > Public > www-style@w3.org > February 2015

[css3-values] feedback

From: Shawn Hempel <shawn@hempel.cx>
Date: Fri, 13 Feb 2015 12:27:48 +0000
Message-ID: <CALOifBa6gZ-XO2=kW-x3PjOatwD7mGOcWXJKvxihj_kD5qU3MQ@mail.gmail.com> (sfid-20150213_122755_131210_00A080F1)
To: www-style@w3.org
Please consider adding an abs() operator for calc().

This simple operator would enable mathematical workarounds for the lack of
max() and min(), which I understand was apparently eliminated from the spec
due to complexities in performing the comparisons.

An abs() function would make it possible to calculate either max() or min()
using simple functions:

max(x, y) = (x + y) / 2 + abs(x - y) / 2
min(x, y) = ((x + y) - abs(x - y)) / 2


Thanks for your time.
Received on Friday, 13 February 2015 17:50:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC