https://github.com/kevgk/pug-sass-filter
A sass filter for pug.
https://github.com/kevgk/pug-sass-filter
filter inline-styles pug sass scss
Last synced: 2 months ago
JSON representation
A sass filter for pug.
- Host: GitHub
- URL: https://github.com/kevgk/pug-sass-filter
- Owner: kevgk
- Created: 2018-10-07T00:27:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T22:23:10.000Z (over 7 years ago)
- Last Synced: 2025-10-02T14:12:52.434Z (9 months ago)
- Topics: filter, inline-styles, pug, sass, scss
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pug-sass-filter
A sass filter for pug.
## How to use
```javascript
const sassFilter = require('pug-sass-filter');
pug.renderFile('file', {
filters: {
'sass': sassFilter
}
});
```
```pug
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
```pug
html
head
style
:sass(style="compressed")
.classname {
.child {
border: solid 1px #ccc;
}
}
body
h1 Hello world.
```