varss
A scss library for working with CSS Variables
Install
npm i varss -D
Usage
Basically you make use of a mixin var-set
for variable definition in conjunction with a function var-get
for accessing your variable as css custom property. You can pass in maps as well and get back maps containing css variables then accordingly.
Here's a complete example...
// variables.scss ;; :root
// Button.scss .Button
Output:
Note:
varss
is intented for being used at application level and is currently not suited for being incorporated into a dedicated scss library
Development
In order to run specs, issue the following from your terminal:
npm test
Run dev-server
npm start
Create a build (for whatever purpose)
npm run build