Adds fallbacks to your CSS var() functions
MIT License
Given:
:root {
--shadow-depth-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
--color-rgb: 45, 45, 45;
}
.test {
box-shadow: var(--shadow-depth-1);
color: rbga(var(--color-rgb), 0.5);
}
We used to output (incorrectly):
.test {
box-shadow: var(--uui-shadow-depth-5,0,19px,38px,rgba(0,0,0,0.30),,,0,15px,12px,rgba(0,0,0,0.22));
color: rbga(var(--color-rgb,45,,,45,,,45), 0.5);
}
Now it outputs:
.test {
box-shadow: var(
--shadow-depth-1,
0 1px 3px rgba(0, 0, 0, 0.12),
0 1px 2px rgba(0, 0, 0, 0.24)
);
color: rbga(var(--color-rgb, 45, 45, 45), 0.5);
}
Thanks to @julczka for the fix!! 🎉 🙇
Published by stipsan almost 4 years ago
Support for importing from CSS files in importFrom
will come in the next version.