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

Interpolation with arithmetic breaks syntax #24

Open
prurigro opened this issue Mar 14, 2024 · 1 comment
Open

Interpolation with arithmetic breaks syntax #24

prurigro opened this issue Mar 14, 2024 · 1 comment

Comments

@prurigro
Copy link

This example of interpolation without arithmetic doesn't cause any issues with the syntax after (though the entirety of #{$grid-gutter-width} including the #{} registers as @string.scss):

top: calc(50% + #{$grid-gutter-width});

All of the following are examples of interpolation with arithmetic, which causes the syntax following them to break:

transform: translateY(#{$grid-gutter-width * $grid-gutter-width});
transform: translateY(#{$grid-gutter-width * 2});
transform: translateY(#{2px + 2px});
top: calc(50% + #{$grid-gutter-width + 2px});

The broken syntax largely registers as strings (the white properties are seen as strings).

image

Interestingly, the $sort-arrow-size doesn't have syntax normally, but in the broken syntax actually registers as @variable.parameter.scss

@prurigro
Copy link
Author

This actually looks like this is probably related to #18 - I didn't realize interpolation wasn't supported. I'll leave this open for someone to skim through in case the cases and screenshot were helpful, but feel free to close this one.

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

No branches or pull requests

1 participant