Skip to main content

How to import .SCSS files after uploading them to the theme???

I have uploaded a file "global.scss" to my theme. In "theme.scss" I've tried to import it using the following:

@import '/srv/nbuild/releases/20130729212540/public/stylesheets/scss/global.scss';

and 

@import 'global.scss';

and even:

@import '{{ theme['global.scss'] }}';

None of those work. It throws an error and I cannot save the theme.scss.

How do I include other .SCSS files from the the main "theme.scss"?? This should be clearly documented.

 Thank you

Official response from

You can @import SCSS or CSS files by adding an underscore to the beginning of the scss/css filename, and leaving the underscore and file extension off when importing it into your stylesheet. 

For example: 

Name your stylesheet something like: _stylesheet.scss. 

Then in theme.scss, reference it like this: 

@import “stylesheet”;

Share this post

Showing 12 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.