Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@csstools/postcss-sass
Advanced tools
PostCSS Sass lets you use Sass as a PostCSS plugin.
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
:root {
color: $primary-color;
font: 100% $font-stack;
}
/* becomes */
:root {
color: #333;
font: 100% Helvetica, sans-serif;
}
PostCSS Sass uses dart-sass, letting you safely run transforms before and after Sass, watching for changes to Sass imports, and preserving source maps.
Add PostCSS Sass to your build tool:
npm install postcss @csstools/postcss-sass --save-dev
Use PostCSS Sass to process your CSS:
require('@csstools/postcss-sass').process(YOUR_CSS);
Use PostCSS Sass as a plugin:
postcss([
require('@csstools/postcss-sass')(/* dart-sass options */)
]).process(YOUR_CSS);
The standard CSS parser included with PostCSS may not be able to parse SCSS specific features like inline comments. To accurately parse SCSS, use the SCSS Parser.
npm install postcss-scss --save-dev
const postcss = require('postcss');
const postcssSass = require('@csstools/postcss-sass');
postcss([
postcssSass(/* pluginOptions */)
]).process(YOUR_CSS, {
syntax: require('postcss-scss')
});
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Use PostCSS Sass in your Gulpfile:
var postcss = require('gulp-postcss');
gulp.task('css', function () {
return gulp.src('./src/*.css').pipe(
postcss([
require('@csstools/postcss-sass')(/* dart-sass options */)
])
).pipe(
gulp.dest('.')
);
});
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Use PostCSS Sass in your Gruntfile:
grunt.loadNpmTasks('grunt-postcss');
grunt.initConfig({
postcss: {
options: {
use: [
require('@csstools/postcss-sass')(/* dart-sass options */)
]
},
dist: {
src: '*.css'
}
}
});
PostCSS Sass options are directly forwarded to dart-sass options.
5.1.1 (December 28, 2023)
FAQs
Use Sass as a PostCSS plugin
The npm package @csstools/postcss-sass receives a total of 27,641 weekly downloads. As such, @csstools/postcss-sass popularity was classified as popular.
We found that @csstools/postcss-sass demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.