Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Update to PostCSS 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvdo committed Aug 24, 2015
1 parent 0e7fae1 commit 0f467e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/pixrem.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ Pixrem.prototype.postcss = function (css) {

if (_options.html) {
// First, check root font-size
css.eachRule(function (rule) {
css.walkRules(function (rule) {
if (rule.parent && rule.parent.type === 'atrule') { return; }
if (/^(html|:root)$/.test(rule.selectors)) {
rule.eachDecl(function (decl) {
rule.walkDecls(function (decl) {
if (decl.prop === 'font-size') {
_rootvalue = decl.value;
} else if (decl.prop === 'font' && decl.value.match(/\d/)) {
Expand All @@ -65,7 +65,7 @@ Pixrem.prototype.postcss = function (css) {
}

//Then, for each rules
css.eachRule(function (rule) {
css.walkRules(function (rule) {

// if options.at-rules is false AND it's not IE9-10: skip @rules
if (!_options.atrules && !isIE9_10) {
Expand Down Expand Up @@ -100,9 +100,9 @@ Pixrem.prototype.postcss = function (css) {
decl.value = value;
} else {
var clone = decl.clone({ value: value });
if (decl.before) {
clone.before = decl.before;
decl.before = reduceLineBreaks(decl.before);
if (decl.raws.before) {
clone.raws.before = decl.raws.before;
decl.raws.before = reduceLineBreaks(decl.raws.before);
}
rule.insertBefore(i, clone);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"browserslist": "^0.5.0",
"postcss": "^4.0.0",
"postcss": "^5.0.0",
"reduce-css-calc": "^1.2.0"
},
"devDependencies": {
Expand Down

0 comments on commit 0f467e9

Please sign in to comment.