Dynamic vars support
This commit is contained in:
parent
fa9c0d2f94
commit
8bb388fb25
|
@ -67,11 +67,9 @@ class Comms {
|
|||
BDIpc.on('bd-compileSass', o => {
|
||||
const { scss, path } = o.args;
|
||||
if (!scss && !path) return;
|
||||
const data = scss ? `${scss} @import '${path}';` : `@import '${path}';`;
|
||||
|
||||
sass.render({
|
||||
file: path,
|
||||
data: scss
|
||||
}, (err, result) => {
|
||||
sass.render({ data }, (err, result) => {
|
||||
if (err) {
|
||||
o.reply({ err });
|
||||
return;
|
||||
|
|
|
@ -5,5 +5,5 @@ div {
|
|||
}
|
||||
|
||||
span {
|
||||
border: 1px solid brown;
|
||||
border: 1px solid rgba(20, 20, 20, $spanOpacity);
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
$divBg: green;
|
||||
$divBg: green !default;
|
||||
$spanOpacity: 0.5 !default;
|
Loading…
Reference in New Issue