W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css-style-attr] SVG WG comments on CSS Styling Attributes Level 1

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 1 Sep 2010 07:49:40 +0200
Message-ID: <19581.59764.121106.154771@gargle.gargle.HOWL>
To: Brendan Kenny <bckenny@gmail.com>
Cc: www-style@w3.org, www-svg@w3.org
Also sprach Brendan Kenny:

 > The issue I encounter daily is using JavaScript to set CSS properties
 > that accept <number>s. Every time real numbers are allowed and zero is
 > a possible value, the number must be checked since floating-point
 > issues ensure that if the exact solution to an equation is zero, the
 > numerical solution will often only be close to zero and so be
 > serialized using e-notation.

I understand your concern; we should be able to find a solution to
this. My own concerns are limited to CSS exposed to humans, not APIs
buried inside a computer. So, this should be possible:


if/when the style values are exported to a human, one should ensure
that e-notation is converted to normal notation. It seems, to my
simple mind, that it would be possible to find one point in the code
where this can happen so that programmers don't have to perform the
checks you describe.

(I also think there should be a way to serialize JS without suddenly
switching notation.)


              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Wednesday, 1 September 2010 05:50:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC