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

On Sun, Aug 29, 2010 at 12:07 PM, fantasai
<fantasai.lists@inkedblade.net> wrote:
>> What does everyone else think?
>
> See above.
>
> I understand the arguments for harmonizing number literal notation
> across languages, but I also agree with Håkon's argument that e-notation,
> especially with negative exponents and in a context where unit identifiers
> and subtraction are natural, is confusing.
>
> ~fantasai

I definitely understand this argument, though I agree with Tab that it
is a bit of a red herring. Few authors will ever need to manually use
"e notation" in a stylesheet, let alone want to use it.

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. While CSSOM will fix some of this
serialization madness (for properties like opacity), more complicated
style properties (like transform functions) will continue to be
discarded if they contain a number expressed using scientific notation
anywhere within the value string.

If there isn't a fundamental grammar issue (I'll defer to others on
that one), the possibility of someone writing terrible stylesheets
(which would have to be pretty much willfully done, at which point
there are bigger problems) seems completely outweighed by the help
this would give JavaScript authors.

Received on Monday, 30 August 2010 22:48:59 UTC