stylecow-plugin-nested-rules
Advanced tools
Comparing version 4.2.1 to 4.2.2
11
index.js
@@ -154,2 +154,10 @@ module.exports = function (stylecow) { | ||
function mergeMediaQuery (mediaQueries, appendedMediaQuery) { | ||
mediaQueries.push((new stylecow.Keyword()).setName('and')); | ||
if ((appendedMediaQuery.length === 1) && (appendedMediaQuery[0].type === 'ConditionalExpression')) { | ||
mediaQueries.push(appendedMediaQuery[0]); | ||
return mediaQueries; | ||
} | ||
var expression = new stylecow.ConditionalExpression(); | ||
@@ -161,5 +169,2 @@ | ||
var joinKeyword = (new stylecow.Keyword()).setName('and'); | ||
mediaQueries.push(joinKeyword); | ||
mediaQueries.push(expression); | ||
@@ -166,0 +171,0 @@ |
{ | ||
"name": "stylecow-plugin-nested-rules", | ||
"description": "Stylecow plugin to add support for nested rules.", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"author": "Oscar Otero <oom@oscarotero.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-nested-rules", |
@@ -293,21 +293,16 @@ { | ||
{ | ||
"class": "ConditionalExpression", | ||
"class": "ConditionalFeature", | ||
"name": "max-width", | ||
"vendor": null, | ||
"children": [ | ||
{ | ||
"class": "ConditionalFeature", | ||
"name": "max-width", | ||
"vendor": null, | ||
"class": "Value", | ||
"children": [ | ||
{ | ||
"class": "Value", | ||
"class": "Unit", | ||
"name": "px", | ||
"children": [ | ||
{ | ||
"class": "Unit", | ||
"name": "px", | ||
"children": [ | ||
{ | ||
"class": "Number", | ||
"name": 501 | ||
} | ||
] | ||
"class": "Number", | ||
"name": 501 | ||
} | ||
@@ -314,0 +309,0 @@ ] |
@@ -350,21 +350,16 @@ { | ||
{ | ||
"class": "ConditionalExpression", | ||
"class": "ConditionalFeature", | ||
"name": "max-width", | ||
"vendor": null, | ||
"children": [ | ||
{ | ||
"class": "ConditionalFeature", | ||
"name": "max-width", | ||
"vendor": null, | ||
"class": "Value", | ||
"children": [ | ||
{ | ||
"class": "Value", | ||
"class": "Unit", | ||
"name": "px", | ||
"children": [ | ||
{ | ||
"class": "Unit", | ||
"name": "px", | ||
"children": [ | ||
{ | ||
"class": "Number", | ||
"name": 899 | ||
} | ||
] | ||
"class": "Number", | ||
"name": 899 | ||
} | ||
@@ -371,0 +366,0 @@ ] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46575
1694