Skip to content

Upgrade to PostCSS 5.x #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for (var prop in fontVariantProperties) {
// create if does not exist
function getFontFeatureSettingsPrevTo(decl) {
var fontFeatureSettings = null;
decl.parent.eachDecl(function(decl) {
decl.parent.walkDecls(function(decl) {
if (decl.prop === "font-feature-settings") {
fontFeatureSettings = decl;
}
Expand All @@ -88,10 +88,10 @@ function getFontFeatureSettingsPrevTo(decl) {
*/
module.exports = postcss.plugin("postcss-font-variant", function() {
return function(styles) {
styles.eachRule(function(rule) {
styles.walkRules(function(rule) {
var fontFeatureSettings = null
// read custom media queries
rule.eachDecl(function(decl) {
rule.walkDecls(function(decl) {
if (!fontVariantProperties[decl.prop]) {
return null
}
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
"index.js"
],
"dependencies": {
"postcss": "^4.1.16"
"postcss": "^5.0.4"
},
"devDependencies": {
"jscs": "^2.1.0",
"jshint": "^2.8.0",
"tape": "^4.0.3"
},
"scripts": {
"lint": "jscs *.js **/*.js && jshint . --exclude-path .gitignore",
"lint": "npm run jscs && npm run jshint",
"jscs": "jscs index.js test/index.js",
"jshint": "jshint . --exclude-path .gitignore",
"test": "npm run lint && tape test"
}
}