Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

postcss-sass

AleshaOleg4.3mMIT0.5.0

A Sass parser for PostCSS, using gonzales-pe.

postcss, css, postcss-plugin, postcss-sass, sass

readme

postcss-sass

Build Status Coverage Status Greenkeeper badge Cult Of Martians

A Sass parser for PostCSS, using gonzales-pe.

Not all Sass syntax supported. Parser under development.

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

Install

npm i postcss-sass --save

Usage

var postcssSass = require("postcss-sass");

postcss(plugins).process(sass, { syntax: postcssSass }).then(function (result) {
    result.content // Sass with transformations
});

changelog

0.1.0

  • Initial release.
  • Basic Sass syntax support. Now supporting nesting and pseudo-classes.

0.2.0

  • Fixed nesting.
  • Variables, comments, '!important' support.
  • Added stringifier.

0.3.0

  • Refactoring (@sdwvit).
  • List/map.
  • Loop.
  • Move to ES6 syntax (@gucong3000).
  • Test cases for stylelint (@gucong3000).
  • Multiline comments (@gucong3000).
  • Interpolation.

0.3.1

  • Dependencies update (PostCSS, ESLint, Jest, postcss-parser-tests, postcss-scss).
  • hoek dependency security fix.

0.3.2

  • Fix percentage unit for value of property (@renataogarcia).

0.3.3

  • Updated dependencies.

0.3.4

  • Added source and parent fields to comment node.

0.3.5

  • Minor updates in comment node.

0.4.0

  • Added support for media queries.
  • Updated dependencies.

0.4.1

  • Return null if node in process method didn't find.

0.4.2

  • Added ignoring of unsupported rules which starts from @ (@alpaca-tc).

0.4.4

  • Dependencies update.

0.5.0

  • Updated postcss to version 8.