
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
postcss-pseudo-classes
Advanced tools
PostCSS plugin to convert pseudo-classes to classes for testing purposes
PostCSS plugin to automatically add in companion classes where pseudo-selectors are used. This allows you to add the class name to force the styling of a pseudo-selector, which can be really helpful for testing or being able to concretely reach all style states.
This plugin is a port of rework-pseudo-classes written by Alex Sexton.
$ npm install postcss-pseudo-classes
var pseudoclasses = require('postcss-pseudo-classes')({
// default contains `:root`.
blacklist: [],
// (optional) create classes for a restricted list of selectors
// N.B. the colon (:) is optional
restrictTo: [':nth-child', 'hover'],
// default is `false`. If `true`, will output CSS
// with all combinations of pseudo styles/pseudo classes.
allCombinations: true,
// default is `true`. If `false`, will generate
// pseudo classes for `:before` and `:after`
preserveBeforeAfter: false
});
postcss([ pseudoclasses ])
.process(css)
.then(function (result) { console.log(result.css); });
.some-selector:hover {
text-decoration: underline;
}
yields
.some-selector:hover,
.some-selector.\:hover {
text-decoration: underline;
}
<button class="some-selector :hover">howdy</button>
:nth-child(5)
would look like .class.\:nth-child\(5\)
and can be used as a regular class: <button class=":nth-child(5)">howdy</button>
.:focus:hover
becomes .\:focus.\:hover
.$ npm test
(MIT)
FAQs
PostCSS plugin to convert pseudo-classes to classes for testing purposes
The npm package postcss-pseudo-classes receives a total of 7,927 weekly downloads. As such, postcss-pseudo-classes popularity was classified as popular.
We found that postcss-pseudo-classes 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.