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

calc w/ scss variable - no error #163

Closed
ELI7VH opened this issue Apr 8, 2021 · 4 comments
Closed

calc w/ scss variable - no error #163

ELI7VH opened this issue Apr 8, 2021 · 4 comments

Comments

@ELI7VH
Copy link

ELI7VH commented Apr 8, 2021

given the following code:

height: calc(100% - $some-variable); 

the linter should return an error, because it is invalid.

@bjankord
Copy link
Owner

bjankord commented Apr 9, 2021

I'm open to a PR for a fix

@ELI7VH
Copy link
Author

ELI7VH commented Apr 14, 2021

I would love to, I just don't know the first thing about how this works. Figured you might have a quick fix given you have the domain knowledge.

Anyways. Just wanted to point it out. Thanks!

@binyamin
Copy link

@ELI7VH why is this invalid? The variable would just be replaced by the value of the variable, and the CSS would be valid.

@ELI7VH
Copy link
Author

ELI7VH commented Jan 6, 2022

@binyamin I did a bit more research, and it looks like you have to interpolate the variable. would look like this in the end:

height: calc(100% - #{$some-variable}); 

https://stackoverflow.com/a/20236515

@ELI7VH ELI7VH closed this as completed Jan 6, 2022
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

3 participants