Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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 424 weekly downloads. As such, css-variables-loader popularity was classified as not 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.