Skip to content
Autoprefixer for stylus
JavaScript
Branch: master
Clone or download
Latest commit 5d1e74f Jul 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test update a lot of things Jul 26, 2019
.editorconfig add editorconfig Feb 18, 2014
.gitignore #181 Remove deprecated packages, update test logic Jul 26, 2019
.npmignore #181 Remove deprecated packages, update test logic Jul 26, 2019
.prettierrc update a lot of things Jul 26, 2019
.travis.yml update travis Jul 26, 2019
LICENSE.md update to v3 Aug 22, 2014
index.js update a lot of things Jul 26, 2019
package-lock.json 1.0.0 Jul 26, 2019
package.json 1.0.0 Jul 26, 2019
readme.md update a lot of things Jul 26, 2019

readme.md

Autoprefixer Stylus

An autoprefixer plugin for stylus.

npm tests coverage dependencies

Installation

You can install through npm as such: npm install autoprefixer-stylus

Usage

You can include autoprefixer-stylus as a normal stylus plugin. Basic example below:

const stylus = require('stylus')
const autoprefixer = require('autoprefixer-stylus')

stylus(css)
  .use(autoprefixer())
  .render(function(err, output) {
    console.log(output)
  })

This plugin also takes any of the options that autoprefixer normally takes. Example with overrideBrowswerslist below:

stylus(css).use(autoprefixer({ overrideBrowserslist: ['ie 7', 'ie 8'] }))

By default, this plugin will display any warnings. You can disable this with the hideWarnings option. Example below:

stylus(css)
  .use(autoprefixer({ hideWarnings: true });

If you'd like to install globally and run from the command line, you can do it like this:

npm install -g autoprefixer-stylus
stylus -u autoprefixer-stylus -c example.styl
You can’t perform that action at this time.