postcss/postcss-scss

Name: postcss-scss

Owner: PostCSS

Description: SCSS parser for PostCSS.

Created: 2015-08-09 13:12:10.0

Updated: 2018-05-24 10:28:16.0

Pushed: 2018-05-16 17:22:57.0

Homepage:

Size: 306

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

PostCSS SCSS Syntax Build Status

<img align=“right” width=“95” height=“95”

 title="Philosopher?s stone, logo of PostCSS"
 src="http://postcss.github.io/postcss/logo.svg">

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

Install
--save install postcss-scss

or (if you use Yarn)

 add --dev postcss-scss
Usage

There are two ways to use this parser:

1. SCSS Transformations

The main use case of this plugin is to apply PostCSS transformations directly to SCSS source code.

For example, you can lint SCSS source with Stylelint and linter will automatically fix issues in the source.

ostcss.config.js
le.exports = {
ntax: 'postcss-scss',
ugins: {
?


2. Inline Comments for PostCSS

Also you can use this parser just to add // single-line comment to your PostCSS project (without any Sass):

t {
// Main theme color
--color: red;

Note that you don?t need a special stringifier to handle the output; the default one will automatically convert single line comments into block comments.

ostcss.config.js
le.exports = {
rser: 'postcss-scss',
ugins: {
?


If you want Sass behaviour with removing inline comments, you can use postcss-strip-inline-comments plugin.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.