sw-variables
A much simpler way to use CSS variables.
Usage
Input
@sw-variables {
red: rgb(255, 0, 0);
}
.elem {
color: red;
}
Output
:root {
--red: rgb(255, 0, 0);
}
.elem {
color: var(--red);
}
A much simpler way to use CSS variables.
@sw-variables {
red: rgb(255, 0, 0);
}
.elem {
color: red;
}
:root {
--red: rgb(255, 0, 0);
}
.elem {
color: var(--red);
}