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

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 UTC