Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG and CSS properties in the same file

When I put SVG and CSS properties in a single file:

.circle {
    stroke: red;
}

.myArea {
    width: 100%;
}

It works. But is it valid according to the W3C? This code doesn't pass the validation tests of the CSS validator, and I can't find an option "CSS + SVG"...

like image 793
Arnaud Avatar asked Nov 12 '22 03:11

Arnaud


1 Answers

stroke is a CSS property (supported by all browsers with support for SVG). I think this may just be a case of the validator not having a mode for this. All current browsers already support this kind of stylesheet, since they support svg.

like image 95
Erik Dahlström Avatar answered Nov 14 '22 23:11

Erik Dahlström