Skip to content

Files

Latest commit

 

History

History
47 lines (31 loc) · 1.01 KB

font-family-no-missing-generic-family-keyword.md

File metadata and controls

47 lines (31 loc) · 1.01 KB

Pattern: Unexpected missing generic font family

Issue: -

Description

Disallows missing generic families in lists of font family names.

Examples

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; }

It's also not a violation to use a keyword related to property inheritance.

a { font: inherit; }
b { font: initial; }
i { font: unset; }

It's also not a violation to use a generic font family anywhere in the list. In other words, the generic font name doesn't need to be the last.

a { font-family: Helvetica Neue, sans-serif, Apple Color Emoji; }

Further Reading