4 [![NPM version](https://img.shields.io/npm/v/postcss-html.svg?style=flat-square)](https://www.npmjs.com/package/postcss-html)
5 [![Travis](https://img.shields.io/travis/gucong3000/postcss-html.svg)](https://travis-ci.org/gucong3000/postcss-html)
6 [![Codecov](https://img.shields.io/codecov/c/github/gucong3000/postcss-html.svg)](https://codecov.io/gh/gucong3000/postcss-html)
8 <img align="right" width="95" height="95"
9 title="Philosopher’s stone, logo of PostCSS"
10 src="http://postcss.github.io/postcss/logo.svg">
12 [PostCSS](https://github.com/postcss/postcss) Syntax for parsing HTML / [Markdown](https://daringfireball.net/projects/markdown/syntax) / [Vue component](https://vue-loader.vuejs.org/)
16 First thing's first, install the module:
19 npm install postcss-html --save-dev
22 If you want support SCSS/SASS/LESS/SugarSS syntax, you need to install the corresponding module.
24 - SCSS: [PostCSS-SCSS](https://github.com/postcss/postcss-scss)
25 - SASS: [PostCSS-SASS](https://github.com/aleshaoleg/postcss-sass)
26 - LESS: [PostCSS-LESS](https://github.com/shellscape/postcss-less)
27 - SugarSS: [SugarSS](https://github.com/postcss/sugarss)
32 var syntax = require('postcss-html');
33 postcss(plugins).process(source, { syntax: syntax }).then(function (result) {
34 // An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
39 ### Style Transformations
41 The main use case of this plugin is to apply PostCSS transformations to HTML / [Markdown](https://daringfireball.net/projects/markdown/syntax) / [Vue component](https://vue-loader.vuejs.org/). For example, if you need to lint SCSS in `*.vue` with [Stylelint](http://stylelint.io/); or you need add vendor prefixes to CSS in `*.html` with [Autoprefixer](https://github.com/postcss/autoprefixer).
43 ### Syntax Infer for Stylesheet Files
45 When passing a stylesheet file, syntaxe can automatically be inferred from the following file extensions: `.less`, `.sass`, `.scss` and `.sss`, others will be inferred as CSS.
47 ### Custom unknown syntax
50 var syntax = require('postcss-html');
51 postcss(plugins).process(html, {
53 stylus: require('postcss-stylus')
55 }).then(function (result) {