Skip to content

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

License

Notifications You must be signed in to change notification settings

matthewrennie/sbt-autoprefixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published