Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2023.
The SVGStyleElement.sheet read-only property returns the CSSStyleSheet corresponding to the given SVG style element, or null if there is none.
A CSSStyleSheet, or null if the element has no associated style sheet.
This example demonstrates how to get the CSS sheet associated with an element.
The HTML contains an SVG definition for a <circle>.
The code below creates a style element (an SVGStyleElement) and adds it to the SVG.
The code below then logs the sheet and CSS rule associated with this new element, using style.sheet. To make
The result is shown below. On success, the log shows the CSSStyleSheet object applied to the SVG circle.
| CSS Object Model (CSSOM) # dom-linkstyle-sheet |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Mar 18, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.