mozilla

Revision 426903 of contentStyleType

  • Revision slug: Web/SVG/Attribute/contentStyleType
  • Revision title: contentStyleType
  • Revision id: 426903
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment 2 words added, 1 words removedSVG/Attribute/contentStyleType Web/SVG/Attribute/contentStyleType

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 None
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

See also

  • {{ 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 <code>text/css</code></p>
<h2 id="Usage_context">Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td><em>None</em></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 <code>contentStyleType</code> 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 <code>contentStyleType</code> is therefore deprecated</p>
<h2 id="See_also">See also</h2>
<ul> <li>{{ SVGElement("style") }}</li> <li>{{ SVGAttr("style") }}</li>
</ul>
Revert to this revision