Middleman::Autoprefixer
Automatically add vendor prefixes to CSS rules in stylesheets served by Middleman.
Usage
Add the following line to Gemfile
, then run bundle install
:
gem 'middleman-autoprefixer'
After installation, activate the extension in config.rb
:
activate :autoprefixer
Configuration
The extension has 4 optionally configurable fields:
activate :autoprefixer do |config|
config.browsers = ['last 2 versions', 'Explorer >= 9']
config.cascade = false
config.inline = true
config.ignore = ['hacks.css']
end
browsers
The list of targeted browsers. Takes values and uses defaults accordingly to Autoprefixer’s documentation.
cascade
The visual cascade of prefixed properties: true
or false
. Uses the default value accordingly to Autoprefixer’s documentation.
inline
Whether to prefix inline styles within HTML files: true
or false
. Disabled by default.
ignore
The array of patterns or paths to exclude from prefixing. Empty by default.
License
Middleman Autoprefixer was created by Dominik Porada is distributed under the MIT license.