应该在SVG的width
上不使用height
和symbol
属性吗?
这些正在MDN示例https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol中使用
如何解决此验证错误?
只需链接回GitHub问题https://github.com/validator/validator/issues/930,并为遇到此问题的所有人提供反馈:
SVG 1.1 https://www.w3.org/TR/SVG11/struct.html#SymbolElement没有允许符号元素的宽度和高度。但显然是SVG2规格是https://www.w3.org/TR/SVG2/struct.html#SymbolElement。
所以我将更新检查器以允许这些。
直到它是固定的,您可以直接在命令行中使用正则表达式忽略它,或者使用filterfile参数https://github.com/validator/validator#--filterfile-filename进行一系列调整。>