- From: Jim Ley <jim@jibbering.com>
- Date: Wed, 17 Nov 2004 15:28:47 -0000
- To: www-svg@w3.org
"Philippe Lhoste" <PhiLho@GMX.net> wrote in message news:419B6761.1070709@GMX.net... > That's why I am surprised by your statement that CSS is rarely used in > real world documents. The reasons it's rarely used are many fold, here's a few that I know of. It's optional, many user agents do not support it, so if you're authoring for widest possible support including mobile, you don't use it - even if you're not targetting any player but ASV now, you don't cut yourself from the other UA's unless you have to. Authoring tools avoid it, because it's not available everywhere, and it's more complicated to author ( you need to make sure that your specificity of your selectors is accurate, if you do that the easy way your CSS is no smaller as you don't get any re-use.) It complicates scripting - because CSS properties are always higher specificity than attribute properties, it means you have to do setAttributeNS(null,'style','construct a string of all style operties') - this is both slower and more complicated than just setting the stroke-width attribute. My biggest complaint though, is the problem with the user stylesheet, because in CSS the user stylesheet rules supreme, the user stylesheet can render your images inaccessible, this I think shows clearly why CSS should not be used to style rendered semantics, and why the specificity of SVG attribute properties is wrong. Hopefully the WG will address this issue of mine I've had since 1.1 as part of the 1.2 LC, as it obviously all applies to 1.2 as none of this has changed. Cheers, Jim.
Received on Wednesday, 17 November 2004 15:28:53 UTC