Answers for "sass use variables from another file"

CSS
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;
Posted by: Guest on January-30-2021
0

sass use variables from another file

//_variables.scss 
$light: #f5f5f5;
$dark: ##2e3033;

//_theme.scss
@import './_variables'; //relative path to file
body {
	background-color: $dark;
}
Posted by: Guest on January-20-2021
0

sass variables across files

// assets/_master.scss 
$accent: #6D87A7;           
$error: #811702;
Posted by: Guest on January-26-2021
0

sass variables across files

// 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; }
Posted by: Guest on January-26-2021

Code answers related to "sass use variables from another file"

Browse Popular Code Answers by Language