You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the request and for using the template.
The rule intentionally only supports numerics font weights because they play well with variable fonts and we can do a naive find of the font-weight within the font shorthand:
However, a pull request is welcome to add this enhancement i.e. 400 and 700 are aliased as "normal" and "bold" behind the scenes. It'll involve reworking the findFontWeight function to find these nodes (taking into account that the font style can also be normal, e.g. font: normal normal 1em sans-serif;).
The rule would continue to autofix to the closest numeric values as people can use Stylelint's font-weight-notation to enforce keywords.
(Which Stylelint's font-weight-notation rule, if using the "named-where-possible" option will say needs to be (add can be made to autofix: stylelint/stylelint#3158) the keyword equivalent).
The font-weights rules only cover numbers, and I prefer to use aliases when possible, but not EVERY alias.
This is not helping https://github.com/signal-noise/stylelint-scales/blob/master/lib/rules/font-weights/README.md.
And https://stylelint.io/user-guide/rules/list/font-weight-notation/ is not helping either.
Improve the https://github.com/signal-noise/stylelint-scales/blob/master/lib/rules/font-weights/README.md to also allow some aliases.
The text was updated successfully, but these errors were encountered: