Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
postcss-conditionals
Advanced tools
PostCSS plugin that enables @if
statements in your CSS.
npm install postcss-conditionals
var fs = require('fs');
var postcss = require('postcss');
var conditionals = require('postcss-conditionals');
var css = fs.readFileSync('input.css', 'utf8');
var output = postcss()
.use(conditionals)
.process(css)
.css;
Using this input.css
:
.foo {
@if 3 < 5 {
background: green;
}
@else {
background: blue;
}
}
you will get:
.foo {
background: green;
}
Also works well with postcss-simple-vars:
$type: monster;
p {
@if $type == ocean {
color: blue;
} @else if $type == matador {
color: red;
} @else if $type == monster {
color: green;
} @else {
color: black;
}
}
and with postcss-for:
@for $i from 1 to 3 {
.b-$i {
width: $i px;
@if $i == 2 {
color: green;
}
}
}
npm install
parser.jison
file has been changed, regenerate parser.js
by running npm run gen-parser
2.1.0 - 2016-12-21
FAQs
PostCSS plugin that enables @if statements in your CSS
The npm package postcss-conditionals receives a total of 5,627 weekly downloads. As such, postcss-conditionals popularity was classified as popular.
We found that postcss-conditionals 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.