html-autoprefixer
Autoprefix all CSS inside an html page - CSS inside style tags and inside style attributes.
var prefixed = htmlAutoprefixer;
Installation
npm install html-autoprefixer --save
Usage
You pass an html string to .process
and it returns the processed html.
var htmlAutoprefixer = ;var htmlString = "<html><head><style>:fullscreen a { transition: transform 1s; }</style></head><body><h1 style='font-feature-settings: \"liga\", \"dlig\";'>Hello</h1></body></html>"; var prefixed = htmlAutoprefixer;
You can optionally pass cheerio options.
var htmlString = "<HTML></HTML>"; var prefixed = htmlAutoprefixer;// <html></html>
Gulp
Using Gulp? Use gulp-html-autoprefixer.
var gulp = ;var htmlAutoprefixer = ; gulp;
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Running tests
npm install
npm test