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

How to fix an Undefined Variable Error in SCSS? @use (error) | @import (works) #2960

Open
AToal opened this issue Nov 24, 2020 · 2 comments
Open
Labels
needs info Blocked on user response

Comments

@AToal
Copy link

AToal commented Nov 24, 2020

I've run into an Undefined Variable Error writing SCSS. My file structure is sound, because it compiles the rest of the files as it should into main.scss, and I've made sure that variables are at the top of my files being compiled.

I started out using @use, and I get "Error: Undefined variable." I then switched all @use to @import, and it worked.

I'd like to be able to @use instead of @import, so please help me get @use working right.

@babakfp
Copy link

babakfp commented Nov 29, 2020

SASS Documentation
This is not the right place to ask these kinda questions.
My advice is, don't touch your current project. Try to use the @use rule in your new projects.

@Awjin
Copy link
Contributor

Awjin commented Dec 2, 2020

@AToal It's hard to diagnose your problem without an example of the code that is breaking. Are you referencing the variable with a proper namespace?

@Awjin Awjin added the needs info Blocked on user response label Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Blocked on user response
3 participants