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

parse error: multiplication of custom properties and minus in calc #18899

Open
jishidaaaaa opened this issue Apr 12, 2022 · 3 comments
Open

parse error: multiplication of custom properties and minus in calc #18899

jishidaaaaa opened this issue Apr 12, 2022 · 3 comments
Assignees

Comments

@jishidaaaaa
Copy link

The following code was a parse error in an environment using react-scripts@4.0.3 and dart-sass@1.50.0.

left: calc(var(--#{$fa-css-prefix}-li-width, #{$fa-li-width}) * -1);

I don't know why, but if I rewrite it as follows, the error does not occur.
left: calc(-1 * var(--#{$fa-css-prefix}-li-width, #{$fa-li-width}));

Perhaps it has something to do with the order of operations on custom properties, but I have no knowledge of this and would appreciate a fix if this fix is correct.

@tagliala
Copy link
Member

tagliala commented Apr 12, 2022

Reminds me of this problem in bootstrap: react-bootstrap/react-bootstrap#6039 twbs/bootstrap#35033, but yes, we should provide a workaround

@jishidaaaaa
Copy link
Author

Thanks for the info.
I understand that this is not a dart-sass issue, but a post-css issue that the create react app is using.

cf shellscape/postcss-values-parser#138

@tagliala
Copy link
Member

Welcome!

Yes, it should be that issue, but we should provide a workaround. Thanks for spotting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants