Re: CSS styling compliance question

On 8/30/10 1:34 PM, Mark wrote:
> However it's not clear to me if these external style sheets are in
> fact required to be strictly CSS compliant?

In what sense?

> For instance, look at this example in the SVG spec:-
>
> http://www.w3.org/TR/SVG/styling.html#StylingWithCSS
>
> It shows an external style sheet thus:-
>
> mystyle.css
> rect {
>    fill: red;
>    stroke: blue;
>    stroke-width: 3
> }

This should work to set the fill and stroke colors; the stroke-width 
will be a parse error.  (The example in SVG 1.1 section 7.10 using the 
"style" attribute has a similar problem).

> However, all of these properites are not CSS properties but in fact
> SVG properties.

I believe that section 6.3 the second bullet point of SVG 1.1 is 
intended to be a normative requirement that SVG properties be assignable 
via CSS stylesheets.  I agree that clarifying this may be good if it's 
not clear.

> So is this a valid CSS style sheet?

In what sense?  There's no such thing, really, past being a production 
that matches the core CSS grammar.

> Strictly speaking, a CSS parser might reject this as having unknown property
> names according to CSS2.

I believe the normative requirement is that a UA that implements SVG 
_and_ CSS must support these property names in its CSS implementation.

> Can anybody shed any further light on this issue?  Does the fact the
> selector is a 'rect' change anything?

The selector had better not matter.  ;)

-Boris

Received on Monday, 30 August 2010 17:55:57 UTC