3 Require numeric or named (where possible) `font-weight` values. Also, when named values are expected, require only valid names.
6 a { font-weight: bold }
10 a { font: italic small-caps 600 16px/3 cursive; }
12 * And this notation, too */
15 Valid font-weight names are `normal`, `bold`, `bolder`, and `lighter`.
17 This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntaxes.
21 `string`: `"numeric"|"named-where-possible"`
25 `font-weight` values *must always* be numbers.
27 The following patterns are considered violations:
30 a { font-weight: bold; }
34 a { font: italic normal 20px; }
37 The following patterns are *not* considered violations:
40 a { font-weight: 700; }
44 a { font: italic 900 20px; }
47 ### `"named-where-possible"`
49 `font-weight` values *must always* be keywords when an appropriate keyword is available.
51 This means that only `400` and `700` will be rejected, because those are the only numbers with keyword equivalents (`normal` and `bold`).
53 The following patterns are considered violations:
56 a { font-weight: 700; }
60 a { font: italic 400 20px; }
63 The following patterns are *not* considered violations:
66 a { font-weight: bold; }
70 a { font: italic normal 20px; }
73 ## Optional secondary options
75 ### `ignore: ["relative"]`
77 Ignore the [*relative*](https://drafts.csswg.org/css-fonts/#font-weight-prop) keyword names of `bolder` and `lighter`.
79 The following patterns are *not* considered violations:
82 a { font-weight: 400; }
83 a b { font-weight: lighter; }