Both the width and height attributes of <svg> elements can properly be specified as length or percentage content types. The generated components pass any specified values along to the rendered SVG, which then displays at the appropriate size, but if the specified values include units (e.g. 1em, 12px, etc.), the component logs a warning to the console:
[Vue warn]: Invalid prop: type check failed for prop "height". Expected Number, got String.
Both the width and height attributes of
<svg>
elements can properly be specified as length or percentage content types. The generated components pass any specified values along to the rendered SVG, which then displays at the appropriate size, but if the specified values include units (e.g.1em
,12px
, etc.), the component logs a warning to the console: