/sbt-autoprefixer

sbt-web plugin that adds vendor-specific prefixes to CSS using Autoprefixer

Primary LanguageScalaOtherNOASSERTION

sbt-autoprefixer

sbt-web plugin that uses Autoprefixer to post-process CSS and add vendor prefixes to rules by Can I Use.

To use the latest version from Github, add the following to the project/plugins.sbt of your project:

    lazy val root = project.in(file(".")).dependsOn(sbtAutoprefixer)
    lazy val sbtAutoprefixer = uri("git://github.com/matthewrennie/sbt-autoprefixer")

Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:

    lazy val root = (project in file(".")).enablePlugins(SbtWeb)

Declare the execution order of the asset pipeline:

pipelineStages in Assets := Seq(autoprefixer)

The following option are supported:

Option Description
cascade Creates nice visual cascade of prefixes. Default: true.
sourceMap Enables source maps. Default: true.
inlineSourceMap Enables inline source maps by data:uri to annotation comment. Default: false.

The following sbt code illustrates how to include inline source maps

AutoprefixerKeys.inlineSourceMap in Assets := true

To include all CSS files for post processing

includeFilter in autoprefixer := GlobFilter("*.css"),

If you receive duplicate map errors when using incombination with LESS, turn sourceMapping off