Skip to content

Instantly share code, notes, and snippets.

@digitalkaoz
Created March 12, 2018 21:37
Show Gist options
  • Save digitalkaoz/9c7d44d753e4237edc07446c111f21bd to your computer and use it in GitHub Desktop.
Save digitalkaoz/9c7d44d753e4237edc07446c111f21bd to your computer and use it in GitHub Desktop.
node-sass imports with assets
// scss/dep.scss
#foo {
.foo {
background: url('../images/a.jpg');
:fullscreen a {
display: flex
}
}
&--bazz {
background-color: blue;
background: url('../images/b.jpg');
}
}
//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";
}
// main.scss
@import "scss/dep";
@import "font";
#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"; }
@digitalkaoz
Copy link
Author

node-sass main.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment