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

Allow calc function interpolation when declaring CSS custom properties. #947

Merged

Conversation

pamelalozano16
Copy link
Contributor

In the example case --test: calc(#{$c} + 1); , #{$c} is mistakenly identified as an error. Interpolation is used in SassScript to inject dynamic values into a CSS custom property. This allows interpolation when declaring CSS variables.

@kristerkari
Copy link
Collaborator

Thanks! I wonder if we should ignore the custom properties by default, or put this behind an option?

@pamelalozano16
Copy link
Contributor Author

@kristerkari it should always ignore custom properties since these passed through to CSS as-is, for any SassScript interpolation is required.

@kristerkari
Copy link
Collaborator

got it, thanks :)

@kristerkari kristerkari merged commit 9bdfb71 into stylelint-scss:master Jan 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants