pug-sass-filter

1.0.2 • Public • Published

pug-sass-filter

A sass filter for pug.

How to use

const sassFilter = require('pug-sass-filter');
 
pug.renderFile('file', {
    filters: {
        'sass': sassFilter
    }
});
html
  head
    style
      :sass
        .classname {
          .child {
            border: solid 1px #ccc;
          }
        }
  body
    h1 Hello world.

You can pass a style parameter to the filter, to specify how sass should compile your styles.

  • nested (default)
  • expanded
  • compact
  • compressed
html
  head
    style
      :sass(style="compressed")
        .classname {
          .child {
            border: solid 1px #ccc;
          }
        }
  body
    h1 Hello world.

/pug-sass-filter/

    Package Sidebar

    Install

    npm i pug-sass-filter

    Weekly Downloads

    11

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    1.57 kB

    Total Files

    3

    Last publish

    Collaborators

    • kevgk