UnOpacity
UnOpacity lets you use the opacity
property in older Internet Explorer.
/* before */ /* after */
Usage
Add UnOpacity to your build tool:
npm install postcss-unopacity --save-dev
Node
Use UnOpacity to process your CSS:
;
PostCSS
Add PostCSS to your build tool:
npm install postcss --save-dev
Use UnOpacity as a plugin:
;
Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Use UnOpacity in your Gulpfile:
var postcss = ; gulp;
Grunt
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Use UnOpacity in your Gruntfile:
grunt; grunt;
Options
browsers
Type: String
| Array
Default: null
A list of browsers you want to target in your project. If no older Internet Explorer browsers are specified, this plugin will not make any changes to your CSS.
browsers: "> 1%" "last 2 versions" "Firefox ESR"
This may also be defined in package.json
.
method
Type: String
Default: 'replace'
replace
Replace any opacity
property with a fallback.
/* before */ /* after */
copy
Copy any opacity
property with a fallback.
/* before */ /* after */
warn
Warn when an opacity
property is used.
prefixed
Type: Boolean
Default: false
true
Use an -ms-filter
property as a fallback.
/* before */ /* after */
false
Use a filter
property as a fallback.
/* before */ /* after */