A Rework mixin that inserts IE 8's
proprietary opacity filter after any native CSS opacity
declaration.
Install with npm:
npm install --save-dev rework-mixin-opacity
As a Rework mixin:
var rework = require('rework');
var mixin = require('rework-plugin-mixin');
var opacity = require('rework-mixin-opacity');
var css = rework(source)
.use(mixin({
opacity: opacity
}))
.toString();
Reworking this CSS:
div {
opacity: 0.5;
}
Yields:
div {
opacity: 0.5;
-ms-filter: "alpha(opacity=50)"
}
From the repo root:
npm test