
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
cssimportant-loader
Advanced tools
Webpack CSS Loader to add !important to all styles.
While using !important
is typically frowned upon there are times when it can be useful. When building widgets that will be embedded directly into third party websites (no iframe) the CSS rules in the host site may be unpredictable and cause CSS bleeding. Cleanslate CSS is an aggressive CSS reset that can be used for this exact situation, however to use it you need to add !important
to all of your styles to properly override it's resets with your own styles.
This Webpack loader will add !important
to all your styles so you can easily use Cleanslate, without having to manually add important
everywhere.
npm install cssimportant-loader --save-dev
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader', 'cssimportant-loader' ]
}
]
}
}
in your application
import css from 'file.css';
given this CSS:
.modal-bg {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: #EFEFEF;
}
will return this CSS:
.modal-bg {
position: fixed !important;
top: 0 !important;
left: 0 !important;
height: 100% !important;
width: 100% !important;
background: #EFEFEF !important;
}
npm run test
FAQs
Webpack Css Loader to add !important to all styles
The npm package cssimportant-loader receives a total of 1,006 weekly downloads. As such, cssimportant-loader popularity was classified as popular.
We found that cssimportant-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.