7 CSS Properties, XML Attributes, Cascading, and Inheritance

7.1 Introduction: CSS Properties vs. XML Attributes

Any language which is an application of XML and supports Cascading Style Sheets (CSS) will necessarily have some of its element parameters as XML attributes and others as CSS properties. SVG is no exception.

In designing SVG, the following criteria were used to decide which parts of SVG were expressed as XML attributes and which as CSS properties. In general, CSS properties were used for the following:

All remaining parameters are XML attributes. The result is that the majority of parameters in SVG are expressed as CSS properties.

7.2 Cascading and Inheritance of XML Attributes and CSS Properties

SVG conforms fully to the cascading style rules of CSS (i.e., the rules by which the SVG processor decides which property setting applies to a given element). See the CSS2 specification for a discussion of these rules.

In this document, the definition of each XML attribute and CSS property indicates whether that attribute/property can inherit the value of its parent.

7.3 The Scope/Range of CSS Styles

The following define the scope/range of CSS styles: