Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sass won't keep variables across files

See original GitHub issue

I have this structure


@import "_variables";
@import "_test";


$test-variable: #333;


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/

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:closed
  • Created 10 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

es128commented, Jan 13, 2014

Yup you need to fix your ignored to also match files that start with underscore.

bradenscommented, Jan 15, 2014

@kylefinley Done. See here

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found