Philipp Partosch 46a936d7de added all files to project | 2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago | |
index.js | 2 years ago |
Disallow missing generic families in lists of font family names.
a { font-family: Arial, sans-serif; }
/** ↑
* An example of generic family name */
The generic font family can be:
This rule checks the font
and font-family
properties.
true
The following patterns are considered violations:
a { font-family: Helvetica, Arial, Verdana, Tahoma; }
a { font: 1em/1.3 Times; }
The following patterns are not considered violations:
a { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; }
a { font: 1em/1.3 Times, serif, Apple Color Emoji; }
a { font: inherit; }
a { font: caption; }
a { font-family: var(--font-family-common); }
a { font-family: Helvetica, var(--font-family-common); }
ignoreFontFamilies: ["/regex/", /regex/, "string"]
Given:
["custom-font"]
The following pattern is not considered a violation:
a { font-family: custom-font; }
The following pattern is considered a violation:
a { font-family: invalid-custom-font; }