media
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
The media attribute specifies a media query that must be matched for a style sheet to apply.
You can use this attribute with the following SVG elements:
Example
Usage notes
| Value |
<media-query-list>
|
|---|---|
| Default value | all |
| Animatable | No |
<media-query-list>-
This value holds a media query that needs to match in order for the style sheet to be applied.
If not specified, the style sheet is applied unconditionally.
Specifications
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2 # StyleElementMediaAttribute |