gulp-convert-css-var
Version:
convert css variable to refer value, and add it to the top of corresponding css rule.
19 lines (17 loc) • 391 B
CSS
:root {
--BG-0: #ededed;
--FG-0: rgba(0, 0, 0, .9);
--weui-RED: #ff0000;
--weui-YELLOW: #ffff00;
}
.example {
margin-top: 20px;
color: var(--FG-0);
background: var(--BG-0);
border:1px solid var( --BG-0);
border-left:1px solid var(--BG-222);
background: linear-gradient(0deg, var(--weui-RED), var(--weui-YELLOW));
}
.example .aa {
margin: 10px
}