Created
March 12, 2018 21:37
-
-
Save digitalkaoz/9c7d44d753e4237edc07446c111f21bd to your computer and use it in GitHub Desktop.
node-sass imports with assets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scss/dep.scss | |
#foo { | |
.foo { | |
background: url('../images/a.jpg'); | |
:fullscreen a { | |
display: flex | |
} | |
} | |
&--bazz { | |
background-color: blue; | |
background: url('../images/b.jpg'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fonts.scss | |
@font-face { | |
font-family: Alice; | |
font-style: normal; | |
font-weight: 400; | |
src: url("./fonts/foo.woff") format("woff"); | |
} | |
html { | |
font-size: 24px; | |
} | |
body { | |
font-family: "Alice"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.scss | |
@import "scss/dep"; | |
@import "font"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#foo .foo { | |
background: url("../images/a.jpg"); } | |
#foo .foo :fullscreen a { | |
display: flex; } | |
#foo--bazz { | |
background-color: blue; | |
background: url("../images/b.jpg"); } | |
@font-face { | |
font-family: Alice; | |
font-style: normal; | |
font-weight: 400; | |
src: url("./fonts/foo.woff") format("woff"); } | |
html { | |
font-size: 24px; } | |
body { | |
font-family: "Alice"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node-sass main.scss