📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP

postcss-scss

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
p

postcss-scss

SCSS parser for PostCSS

4.0.9
latest
100

Supply Chain Security

100

Vulnerability

75

Quality

77

Maintenance

100

License

Version published
Weekly downloads
4.3M
-9.48%
Maintainers
1
Weekly downloads
 
Created
Issues
2

What is postcss-scss?

The postcss-scss npm package is a syntax parser that allows PostCSS to process SCSS syntax. It enables users to work with SCSS-like syntax in PostCSS, which is a tool for transforming styles with JavaScript. This package does not compile SCSS into CSS but instead allows you to manipulate SCSS sources within PostCSS plugins.

What are postcss-scss's main functionalities?

Parsing SCSS Syntax

This feature allows developers to parse SCSS syntax using PostCSS. The code sample demonstrates how to set up PostCSS to process a string of SCSS code using the postcss-scss syntax parser.

const postcss = require('postcss');
const syntax = require('postcss-scss');

postcss(plugins)
  .process(scssCode, { syntax: syntax })
  .then(result => {
    console.log(result.css);
  });

Linting SCSS

This feature enables the use of stylelint for linting SCSS files by specifying the postcss-scss parser as the syntax. The code sample shows how to configure stylelint to lint SCSS files using the postcss-scss syntax.

const stylelint = require('stylelint');
const scssSyntax = require('postcss-scss');

stylelint.lint({
  files: 'src/**/*.scss',
  syntax: scssSyntax
}).then(function (result) {
  console.log(result.output);
});

Other packages similar to postcss-scss

FAQs

Package last updated on 28 Sep 2023

Did you know?

Socket

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.

Install

Related posts