Sass won't keep variables across files
See original GitHub issueI have this structure
app.scss
@import "_variables";
@import "_test";
_variables.scss
$test-variable: #333;
_test.scss
input {
color: $test-variable;
}
They are all in the same folder and are in app/styles/
If i run on the terminal:
$> sass app.scss
it works.
But if i run brunch
$> ./scripts/development.sh
the compile fails with :
12 Jan 19:32:42 - error: Compiling of 'app/styles/_test.scss' failed. source string:2: error: unbound variable $test-variable
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
css - SASS - use variables across multiple files - Stack Overflow
You can do it like this: I have a folder named utilities and inside that I have a file named _variables.scss. in that...
Read more >SASS | Use variables across multiple files - GeeksforGeeks
To use variables across multiple files in SASS is carried out by @import rule of SASS. @import rule which import Sass and CSS...
Read more >Sass: @use
The @use rule loads mixins, functions, and variables from other Sass stylesheets, and combines CSS from multiple stylesheets together.
Read more >Stop using @import with Sass | @use and @forward explained
Keep up to date with my Sass course: ... use of @import has been deprecated in Sass ... ... Your browser can't play...
Read more >The New SASS Module System: Out with @import, In with @use
css files can't take advantage of special Sass variables, functions or mixin features, but it can be extended using extend in a Sass...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup you need to fix your
ignored
to also match files that start with underscore.@kylefinley Done. See here