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

CSS function with SCSS interpolations inside is no longer a correct CSS function #975

Closed
marcelweder opened this issue Mar 5, 2024 · 2 comments · Fixed by #976
Closed
Labels
Bug 🐛 Something isn't working Help wanted 🙋 Help is needed

Comments

@marcelweder
Copy link

Since the release of v6.2.0 we get an error function-no-unknown with CSS functions like calc. In v6.2.0 this rule has been extended with a detection if interpolations are present.

We do not understand why a CSS function with SCSS interpolations inside is no longer a correct CSS function. Unfortunately, we now have to extend the scss/function-no-unknown rule to exclude (ignore) the CSS functions.

Example for the reproduction:

$test-sass-variable: 5rem;

.test-rule {
  width: calc(100% - #{$test-sass-variable});
  max-width: calc(100% - 5rem);
}
Before v6.2.0 New is an error
image image

Would be nice if you could correct this again. Thank you.

@kristerkari
Copy link
Collaborator

Thanks! Seems like a bug.

@kristerkari
Copy link
Collaborator

New version out that should fix the bug:
https://github.com/stylelint-scss/stylelint-scss/releases/tag/v6.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working Help wanted 🙋 Help is needed
Development

Successfully merging a pull request may close this issue.

2 participants