gsi

gulp-sass-in-html

sass compilation in html and pug

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

6

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Gulp sass in html

Sass compilation in html and pug


Install

You can get gulp-sass-in-html from NPM:

To save to a project as a dev dependency

npm install gulp-sass-in-html --save-dev

Example

gulpfile.js

var sassInHtml = require('gulp-sass-in-html');

gulp.src('src/test.html')
      .pipe(sassInHtml())
      .pipe(gulp.dest('dist'));

src/test.html

<html>
<head>
  <style type="text/sass">
    body
      background: black
      color: red
      .love
        color: red
        font-size: 12px
  </style>
</head>
<body>
</body>
</html>

dist/test.html

<html>
<head>
  <style type="text/css">
    body {
      background: black;
      color: red; }
      body .love {
        color: red;
        font-size: 12px; }
  </style>
</head>
<body>
</body>
</html>

Use in pug.js

html
  head
  .
    <style type="text/sass">
      body
        background: black
        color: red
        .love
          color: red
          font-size: 12px
    </style>

indent type: spaces indent length: 2 spaces

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial