W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-*] Review of functional syntax in CSS

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 30 Jan 2012 13:52:52 -0800
Message-ID: <CAAWBYDBqy9P1YWMmB4123bT18-M4QTaSPn0PEZK7QVd8ayqE=w@mail.gmail.com>
To: Christoph Päper <christoph.paeper@crissov.de>
Cc: www-style list <www-style@w3.org>
On Sun, Jan 29, 2012 at 1:00 AM, Christoph Päper
<christoph.paeper@crissov.de> wrote:
> Tab Atkins Jr.:
>> even/odd rounding isn't usually present by default (and, I believe, exists mainly to reduce rounding
>> bias when rounding lots of numbers that will be combined together, such as for finance),
>
> Yes, that’s why I think it’s beneficial for CSS, too. Designers hate it when scroll bars appear due to rounding effects.

Note that "reduce rounding bias" is not "eliminate rounding bias".
Financial appilcations tolerate some degree of rounding bias, they
just want it to be small.  Scrollbars don't tolerate it at all.  ^_^


>>> I think if there’s a reason to include one kind of rounding there’s enough reason to include the rest, too.
>>
>> a function that only rounds to the nearest integer multiple of the modulus is rather new,
>
> Yes, but most languages don’t have values to round that are typed as strongly as the ones in CSS and hence don’t round to arbitrary multiples. For what it’s worth, I think the proposed distinction for negative values is more useful.
>
>> and the distinction between toward/away from zero and toward positive/negative infinity isn't usually made.
>
> True, but like I said, usually floor and ceil are special cases of rounding down and up respectively. Since we can’t use their common behavior in CSS it could make sense to select a different one. I merely suggested two.

I'll leave further discussion of rounding functions until the spec
that they're appearing in (Line Grid) actually shows up.

~TJ
Received on Monday, 30 January 2012 21:53:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT