Pattern: Malformed quotation marks around font family name
Issue: -
This rule checks the font
and font-family
properties.
This rule ignores $sass
, @less
, and var(--custom-property)
variable syntaxes.
Expect quotes around every font family name that is not a keyword.
The following patterns are considered violations:
a { font-family: Arial, sans-serif; }
a { font-family: Times New Roman, Times, serif; }
a { font: 1em Arial, sans-serif; }
The following patterns are not considered violations:
a { font-family: 'Arial', sans-serif; }
a { font-family: "Times New Roman", "Times", serif; }
a { font: 1em 'Arial', sans-serif; }
Expect quotes only when quotes are required according to the criteria above, and disallow quotes in all other cases.
The following patterns are considered violations:
a { font-family: "Arial", sans-serif; }
a { font-family: 'Times New Roman', Times, serif; }
a { font: 1em "Arial", sans-serif; }
The following patterns are not considered violations:
a { font-family: Arial, sans-serif; }
a { font-family: Arial, sans-serif; }
a { font-family: Times New Roman, Times, serif; }
a { font-family: "Hawaii 5-0"; }
a { font: 1em Arial, sans-serif; }
Expect quotes only when quotes are recommended according to the criteria above, and disallow quotes in all other cases. (This includes all cases where quotes are required, as well.)
The following patterns are considered violations:
a { font-family: Times New Roman, Times, serif; }
a { font-family: SomeFontVersion6, sake_case_font; }
a { font-family: 'Arial', sans-serif; }
a { font: 1em Times New Roman, Times, serif; }
The following patterns are not considered violations:
a { font-family: 'Times New Roman', Times, serif; }
a { font-family: "SomeFontVersion6", "sake_case_font"; }
a { font-family: Arial, sans-serif; }
a { font: 1em 'Times New Roman', Times, serif; }