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

> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> Behalf Of fantasai


> On 08/28/2010 05:27 PM, Doug Schepers wrote:
> > * For good or ill, it's already allowed in CSS in SVG, so there's
> > backwards-compatibility to consider
> 
> I don't recall this claim. I only remember it being allowed in SVG
> attribute values, which is a different thing. Are you sure of this?

I'm confused too. 

Afaik, there are two number syntaxes [1]:

# <number>
# Real numbers are specified in one of two ways. 
# When used in a stylesheet, a <number> is defined 
# as follows:
#
# number ::= integer
#           | [+-]? [0-9]* "." [0-9]+
# This syntax is the same as the definition in CSS 
# ([CSS2], section 4.3.1).
#
# When used in an SVG attribute, a <number> is defined 
# differently, to allow numbers with large magnitudes to 
# be specified more concisely:
#
#number ::= integer ([Ee] integer)?
#           | [+-]? [0-9]* "." [0-9]+ ([Ee] integer)?


But we also have this requirement [2]:

# For user agents that support CSS, the presentation attributes 
# must be translated to corresponding CSS style rules according 
# to rules described in Precedence of non-CSS presentational hints
#...

Which implies UAs silently convert e-notation attribute values to 
CSS numbers. And that authors have to remember that a presentation
attribute accepts e notation numbers but the corresponding styling 
property does not; last, that numeric SVG attribute values may be
rejected if used as-is in the CSSOM. 

So where's the bit allowing e-notation in CSS ?

[1] http://www.w3.org/TR/SVG/types.html#BasicDataTypes

[2] http://www.w3.org/TR/SVG/styling.html#UsingPresentationAttributes

Received on Wednesday, 8 September 2010 00:03:27 UTC