scss import file code example
Example 1: import mixin from another file
@import "../../../theme/main.scss"
Example 2: sass import variable from another file
// When importing the master, you leave out the underscore, and it
// will look for a file with the underscore. This prevents the SCSS
// compiler from generating a CSS file from it.
@import "assets/master";
// Then do the rest of my CSS afterwards:
.text { color: $accent; }
// assets/_master.scss
$accent: #6D87A7;
$error: #811702;
Example 3: sass import
@import 'path/to/file', 'other/file';
Example 4: scss file structure
> scss
> base
> theme
|- _richBlue.scss
|- ...
|- __base-dir.scss #Import all base .scss files
|- _bootstrap.scss
|- _variables.scss
> components
|- __components-dir.scss #Import all components .scss files
|- _header.scss
|- _ie.scss
|- _liquid-design.scss
|- ...
> global
|- __global-dir.scss #Import all global .scss files
|- _busyloader.scss
|- _scrollbar.scss
|- _utilities.scss
|- ...
> icomoon #Additional third party folders
> fonts
|- demo.html
|- style.css
styles.scss #Import all dir files and third party folders