Styling
From Svg wiki
Where is styling covered in the SVG specification?
Styling is covered in [http:www.w3.org/TR/SVG/styling.html section 6] of the SVG specification.
Is it acceptable to have an SVG implentation that does not support CSS?
Jon Ferraiolo wrote:
There was an extensive debate about whether SVG implementations must support CSS.
Three significant things to note:
- The W3C has two styling languages right now: CSS and XSL. It is not justifiable to require the use of one W3C styling language and not the other, and it is too much to ask implementers to support both.
- CSS carries a cost in terms of implementation requirements, code size, and processing speed. (Adobe, which has implemented most of the CSS features required by SVG, can attest to this.)
- There are many uses for SVG which do not require CSS, such as data exchange.
The decision by the SVG working group was that CSS support in SVG is:
- Required when the user agent already supports CSS for other purposes. (For example, a Web browser that supports CSS with HTML is required to support CSS with SVG also.)
- Otherwise, CSS support is optional.
Even though CSS support in SVG is theoretically optional, right now most implementations are supporting at least a subset of CSS, and most likely this will continue into the future. I think the graphics authoring tools such as Adobe Illustrator and Corel Draw will tend to force support for at least a subset of CSS because they are exporting files that use some combination of the 'style' attribute and the CSS class selector. Since a significant percentage of content out there will be using CSS, tools will be forced to support CSS. Another factor is that there is an open source CSS library in Java, which helps out all of the Java implementations.
