stylecow-plugin-custom-media
Advanced tools
Comparing version 1.0.0 to 1.0.1
19
index.js
@@ -5,12 +5,11 @@ module.exports = function (stylecow) { | ||
stylecow.addTask({ | ||
fn: function (root) { | ||
root. | ||
getAll({ | ||
type: 'AtRule', | ||
name: 'custom-media' | ||
}) | ||
.forEach(function (customMedia) { | ||
root.setData('@custom-media-' + customMedia.get('ExtensionName').name, customMedia.get('MediaQueries')); | ||
customMedia.detach(); | ||
}); | ||
filter: { | ||
type: 'AtRule', | ||
name: 'custom-media' | ||
}, | ||
fn: function (customMedia) { | ||
var root = customMedia.getParent('Root'); | ||
root.setData('@custom-media-' + customMedia.get('ExtensionName').name, customMedia.get('MediaQueries')); | ||
customMedia.detach(); | ||
} | ||
@@ -17,0 +16,0 @@ }); |
{ | ||
"name": "stylecow-plugin-custom-media", | ||
"description": "Stylecow plugin to work with @custom-media", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Oscar Otero <oom@oscarotero.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-custom-media", |
@@ -15,35 +15,7 @@ { | ||
{ | ||
"class": "MediaQueries", | ||
"class": "ConditionalExpression", | ||
"children": [ | ||
{ | ||
"class": "MediaQuery", | ||
"children": [ | ||
{ | ||
"class": "ConditionalExpression", | ||
"children": [ | ||
{ | ||
"class": "ConditionalFeature", | ||
"name": "max-width", | ||
"vendor": null, | ||
"children": [ | ||
{ | ||
"class": "Value", | ||
"children": [ | ||
{ | ||
"class": "Unit", | ||
"name": "em", | ||
"children": [ | ||
{ | ||
"class": "Number", | ||
"name": 30 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
"class": "ExtensionName", | ||
"name": "viewport-max-s" | ||
} | ||
@@ -50,0 +22,0 @@ ] |
Sorry, the diff of this file is not supported yet
17251
544