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

Wrong behavior with function calc-no-unspaced-operator using sass var #6063

Closed
rmoralp opened this issue May 2, 2022 · 1 comment
Closed

Comments

@rmoralp
Copy link

rmoralp commented May 2, 2022

What steps are needed to reproduce the bug?

When function-calc-no-unspaced-operator is configured as true
Given we use a dash separated sass variables and in some cases we add them to a calc
Then stylelint advise us incorrectly that it is an error, identifying it as an operation and not as a sass variable

Example:

$example-var: 2px;

a { font-size: calc(#{$example-var} * 2); }

Error:
image

What Stylelint configuration is needed to reproduce the bug?

{
"rules": {
"function-calc-no-unspaced-operator": true
}
}

How did you run Stylelint?

stylelint "**/*.scss" --config myconfig.json

Which version of Stylelint are you using?

14.8.1

What did you expect to happen?

Not to get an error

What actually happened?

It throws the errors "Expected single space before "-" operator" and "Expected single after before "-" operator"

Does the bug relate to non-standard syntax?

Yes, its related to SCSS

Proposal to fix the bug

No response

@ybiquitous
Copy link
Member

@rmoralp Thanks for opening the report and using the template.

This issue was fixed by #6053. I'll release a patch version in a few days.

Duplicate of #6052

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