
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
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 13,777 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.