Skip to content

Commit

Permalink
Update to PostCSS 5
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Sep 4, 2015
1 parent 92ecd02 commit 995e677
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ module.exports = postcss.plugin('postcss-opacity', function (opts) {

return function (css) {

css.eachRule(function (rule) {
css.walkRules(function (rule) {

// find if a filter opacity is already present
var isFilterAlreadyPresent = false;
rule.eachDecl(PROP_REPLACE, function () {
rule.walkDecls(PROP_REPLACE, function () {
isFilterAlreadyPresent = true;
});

if (!isFilterAlreadyPresent) {
rule.eachDecl(PROP, function (decl) {
rule.walkDecls(PROP, function (decl) {

// get amount and create value
var amount = Math.floor(decl.value * 100);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-opacity",
"version": "2.0.1",
"version": "3.0.0",
"description": "PostCSS plugin to add opacity filter for IE8",
"keywords": [
"postcss",
Expand All @@ -15,7 +15,7 @@
"url": "https://github.com/iamvdo/postcss-opacity.git"
},
"dependencies": {
"postcss": "^4.1.16"
"postcss": "^5.0.4"
},
"devDependencies": {
"chai": "^3.2.0",
Expand Down

0 comments on commit 995e677

Please sign in to comment.