Socket
Socket
Sign inDemoInstall

postcss-scss

Package Overview
Dependencies
4
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postcss-scss

SCSS parser for PostCSS


Version published
Weekly downloads
3.8M
decreased by-0.05%
Maintainers
1
Install size
19.0 kB
Created
Weekly downloads
 

Package description

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

Changelog

Source

4.0.9

  • Fixed \r parsing to fix CVE-2023-44270.

Readme

Source

PostCSS SCSS Syntax

A SCSS parser for PostCSS.

This module does not compile SCSS. It simply parses mixins as custom at-rules & variables as properties, so that PostCSS plugins can then transform SCSS source code alongside CSS.

Sponsored by Evil Martians

Docs

Read full docs here.

Keywords

FAQs

Last updated on 28 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc