WebStorm warns "Attribute viewBox is not allowed here" in svg HTML tags

WebStorm always highlights the "viewBox" attribute in <svg> tags and warns that it's not allowed. I'm pretty sure that it is though. It's defined in the W3C's SVG 1.1 spec.

MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
W3C: https://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute

Screenshot:


Can someone please verify?

2 comments
Comment actions Permalink

I just noticed it also highlights "preserveAspectRadio" attribute, which is related to the "viewBox".

MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio

0
Comment actions Permalink

Please vote for https://youtrack.jetbrains.com/issue/WEB-31136 to be notified on any progress with it

1

Please sign in to leave a comment.