Skip to content

Instantly share code, notes, and snippets.

@farism
Created June 19, 2018 22:10
Show Gist options
  • Save farism/33c863b61d4f9713a713bb7f410e6df3 to your computer and use it in GitHub Desktop.
Save farism/33c863b61d4f9713a713bb7f410e6df3 to your computer and use it in GitHub Desktop.
new way
// variables.scss
$color: "red"
// componentA.scss
@import "variables.scss" // needs this line or it wont find $color
.componentA {
color: $color;
}
// componentB.scss
@import "variables.scss"
.componentB {
color: $color;
}
// manifest.scss
@import componentA
@import componentB
// ComponentA.js
import 'componentA.scss' // has only componentA.scss embedded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment