Skip to content
Boot task for css autoprefixer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Boot task for autoprefixer.

Autoprefixer utilizes the most recent data from Can I Use to add only necessary vendor prefixes.


Make sure postcss-cli and autoprefixer are installed on your system.

npm install --global postcss-cli autoprefixer



In build.boot, import the autoprefixer task:

(set-env! :dependencies '[[danielsz/boot-autoprefixer "x.x.x"]]) ; latest release is indicated above 
(require '[danielsz.autoprefixer :refer [autoprefixer]])

The autoprefixer task takes a vector of filenames, the CSS files you want to post-process with autoprefixer.

(task-options! autoprefixer {:files ["style-1.css" "style-2.css"]})

Autoprefixer uses Browserslist, so you can specify the browsers you want to target in your project by queries like last 2 versions or > 5%

(task-options! autoprefixer {:files ["style-1.css" "style-2.css"]
                             :browsers "last 2 versions"})

You can now compose autoprefixer in your boot pipeline like any other task.

An alternate way of going about this is to forgo task-options! and instead use keyword arguments.

 (cljs :source-map true)
 (autoprefixer :files ["style-1.css" "style-2.css"] 
               :browsers "last 2 versions"))
You can’t perform that action at this time.