Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
css-variables-loader
Advanced tools
Import your CSS variables into JavaScript.
This project assumes you use W3C custom properties for CSS variables. This is how they look:
:root {
--my-theme-color: hsl(121, 90%, 90%);
--my-accent-color: hsl(60, 90%, 90%);
--my-font-size: 18px;
}
Only the custom properties on the :root
selector are currently supported.
This project also assumes you have a Webpack-like setup for building your application.
Install the loader into your project with npm install --save css-variables-loader
.
In your JavaScript, use var variables = require('!css-variables!../path/to/variables.css')
.
Now variables
is a map of variable names to values as strings.
FAQs
Load CSS variables with Webpack
The npm package css-variables-loader receives a total of 1,230 weekly downloads. As such, css-variables-loader popularity was classified as popular.
We found that css-variables-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.