New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix false positives for variables in font-family-no-missing-generic-family-keyword #4765
Comments
I've labelled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to fix a bug in a rule in the Developer guide. |
This introduces a second parse loop through a font-family. To avoid this, we could add an parameter to findFontFamily which dictates whether to include variables in the result, but the function would need to blindly include variables, without sanity checking them (like whether a variable represents a number or something). Fixes stylelint#4765
The same issue still persists with Sass variables (e.g. // stylelint.config.js
module.exports = {
rules: {
'font-family-no-missing-generic-family-keyword': [
true,
{ ignoreFontFamilies: [/\$fontFamilyUI/] }
]
}
} |
I've opened a new PR #5240! |
There are false positives in
font-family-no-missing-generic-family-keyword
if I use a variable and a font family.Demo.
See #3848 (comment).
font-family-no-missing-generic-family-keyword
13.3.0
Demo
No
No warnings to be flagged because the rule should ignore values that contain variables.
The following warnings were flagged:
The text was updated successfully, but these errors were encountered: