Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

html-autoprefixer

Package Overview
Dependencies
2
Maintainers
3
Versions
13
Issues
File Explorer

Advanced tools

html-autoprefixer

Autoprefix all CSS inside an html page - CSS inside style tags and inside style attributes

    0.3.8latest
    GitHub

Version published
Maintainers
3
Weekly downloads
548
decreased by-32.51%

Weekly downloads

Readme

Source

html-autoprefixer

html-autoprefixer

Autoprefix all CSS inside an html page - CSS inside style tags and inside style attributes.

BuildStatus NPM version

var prefixed = htmlAutoprefixer.process(htmlString);

Installation

npm install html-autoprefixer --save

Usage

You pass an html string to .process and it returns the processed html.

var htmlAutoprefixer = require("html-autoprefixer"); 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.process(htmlString);

You can optionally pass cheerio options.

var htmlString = "<HTML></HTML>"; var prefixed = htmlAutoprefixer.process(htmlString, { lowerCaseTags: true } ); // <html></html>

Gulp

Using Gulp? Use gulp-html-autoprefixer.

var gulp = require( "gulp" ); var htmlAutoprefixer = require( "gulp-html-autoprefixer" ); gulp.task( "html-autoprefix", function( ) { return gulp.src( "./path/to/index-or-other.html" ) .pipe( htmlAutoprefixer( ) ) .pipe( gulp.dest( "dist" ) ); } );

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Running tests

npm install npm test

Keywords

FAQs

Last updated on 25 Nov 2015

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc