RE: CSS style sheets in SVG

Everything in CSS that is useful to SVG, as well as SVG-specific extensions,
could be refactored in an XML syntax, with the advantages of extensibility
and ease of parsing that that would entail.

For example, I implemented an alternate syntax in XML (emulated in
EcmaScript) for most of the useful bits [1]. XML syntax and SMIL events seem
far more natural a match with SVG than does CSS and pseudoclasses.

There are 2 presentation languages in the W3C, HTML and SVG. CSS is great
for HTML. That's what it was designed for, and that's still where its focus
is. I'd be very surprised if there were one feature that is more applicable
to SVG than to HTML, while the opposite case is clearly prevalent.
Respectfully speaking, unless the CSS WG treats SVG as a first-class
citizen, I see no point in limiting SVG to the pace and protocols of CSS. 

Separation would permit both SVG and CSS to grow without conflicts. As the
SVG Spec has already done, the more applicable parts of CSS could be folded
into SVG, and vice-versa.

It would even help with Compound Documents, since the cascading model could
be simplified. Rarely would the same rules be applied to both HTML and SVG;
the few cases where both are applicable (colors, for example) would be
trivial to duplicate in CSS for HTML and some XML syntax for SVG (no more
onerous than specifying similar styles for differing selectors in CSS).

[1] http://svg-whiz.com/BAM/

Regards-
Doug

MenTaLguY wrote:
| 
| 
| replying to my own post...
| 
| On Mon, 29 Nov 2004, MenTaLguY wrote:
| 
| > As far as I can tell, I have two choices:  give the panel border 
| > objects a CSS class, tweaking the stroke paint for that class in an 
| > author stylesheet, or I can manually go through and change 
| the color 
| > on every panel border individually.
| >
| > The latter is excrutiatingly painful if I have a lot of 
| panels.  Are 
| > there any less painful approaches which wouldn't involve CSS?
| 
| <solidColor> in SVG 1.2 would work here, actually.  For the 
| sake of the question, substitute stroke weight or dashes for paint.
| 
| -mental
| 

Received on Monday, 29 November 2004 17:19:19 UTC