🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

html-autoprefixer

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-autoprefixer

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

0.3.8
latest
Source
npm
Version published
Weekly downloads
41
-2.38%
Maintainers
3
Weekly downloads
 
Created
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

  • 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

Keywords

autoprefixer

FAQs

Package last updated on 25 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts