Skip to content
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

Use @use rule's namespace will result in a font-family-no-missing-generic-family-keyword error. #387

Closed
kimulaco opened this issue Oct 24, 2019 · 4 comments

Comments

@kimulaco
Copy link

Even if sans-serif is specified, using namespace will result in an error.

"@use" isn't a CSS standard feature, so you may need a new "scss/font-family-no-missing-generic-family-keyword" rule.

// src/scss/_font.scss
$font-family-default: Arial, sans-serif;
// src/scss/_button.scss
@use "font" as font;

.button {
  font-family: font.$font-family-default;
}
src/scss/_button.scss
 4:16  ✖  Unexpected missing generic font family   font-family-no-missing-generic-family-keyword

@use - Choosing a Namespace

@kristerkari
Copy link
Collaborator

Thanks!

Rather than creating a new rule to just fix that error, I think that it would be better to fix the stylelint rule to not throw an error when namespaces are used.

@kimulaco
Copy link
Author

Thanks.
I'm sorry, but I don't have much knowledge about developing stylelint plugins, can this be overridden by plugins?
Or does stylelint require support?

@kimulaco
Copy link
Author

I found a point in stylelint that needs to be fixed, so I will issue an issue on stylelint.
Thank you for checking.

@kimulaco
Copy link
Author

kimulaco commented Nov 5, 2019

Close because stylelint has been modified.

@kimulaco kimulaco closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants