contentStyleType

  • Revision slug: SVG/Attribute/contentStyleType
  • Revision title: contentStyleType
  • Revision id: 55959
  • Created:
  • Creator: pa7
  • Is current revision? No
  • Comment 13 words added

Revision Content

« SVG Attribute reference home

This attribute specifies the style sheet language for the given document fragment. The contentStyleType is specified on the {{ SVGElement("SVG") }} element. By default, if it's not defined, the value is text/css

Usage context

Categories Presentation attribute
Value <content-type>
Animatable No
Normative document SVG 1.1 (2nd Edition)

Since CSS is the only widely deployed style sheet language for online styling and it's already defined as default value if contentStyleType is ommitted, the attribute is not well supported in user agents. If other style sheet languages become more popular they might not use the {{ SVGAttr("style") }} attribute, instead it could be easily declared which style language is used in the {{ SVGElement("style") }}'s type attribue.

The use of contentStyleType is therefore deprecated

Related

  • {{ SVGElement("style") }}
  • {{ SVGAttr("style") }}

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>This attribute specifies the style sheet language for the given document fragment. The contentStyleType is specified on the {{ SVGElement("SVG") }} element. By default, if it's not defined, the value is <strong>text/css</strong></p>
<h2>Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td>Presentation attribute</td> </tr> <tr> <th scope="row">Value</th> <td>&lt;content-type&gt;</td> </tr> <tr> <th scope="row">Animatable</th> <td>No</td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="http://www.w3.org/TR/SVG/styling.html#ContentStyleTypeAttribute" title="http://www.w3.org/TR/SVG/styling.html#ContentStyleTypeAttribute">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<p>Since CSS is the only widely deployed style sheet language for online styling and it's already defined as default value if contentStyleType is ommitted, the attribute is not well supported in user agents. If other style sheet languages become more popular they might not use the {{ SVGAttr("style") }} attribute, instead it could be easily declared which style language is used in the {{ SVGElement("style") }}'s type attribue.</p>
<p>The use of contentStyleType is therefore deprecated</p>
<h2>Related</h2>
<ul>
<li>{{ SVGElement("style") }}</li>
<li>{{ SVGAttr("style") }}</li>
</ul>
Revert to this revision