selector-attribute-quotes
Require or disallow quotes for attribute values.
[target="_blank"] {}/** ↑ ↑ * These quotes */Use this rule to enforce a convention. Quotes around an attribute value are required when it contains spaces or special characters, and optional otherwise.
Choose:
"always"so that any value works, e.g.[href="/"]"never"for brevity, as this rule allows the quotes a value needs
The fix option can automatically fix most of the problems reported by this rule.
This rule supports 1 message argument: the attribute value.
Options
Section titled “Options”"always"
Section titled “"always"”Attribute values must always be quoted.
{ "selector-attribute-quotes": "always"}The following patterns are considered problems:
[title=flower] {}[class^=top] {}The following patterns are not considered problems:
[title] {}[target="_blank"] {}[class|="top"] {}[title~='text'] {}[data-attribute='component'] {}"never"
Section titled “"never"”Attribute values must never be quoted.
{ "selector-attribute-quotes": "never"}The following patterns are considered problems:
[target="_blank"] {}[class|="top"] {}[title~='text'] {}[data-attribute='component'] {}The following patterns are not considered problems:
[title] {}[title=flower] {}[class^=top] {}