Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update distribution.

  • Loading branch information...
commit c18bc34e0fd5e84a77c6eef30e97f2b81df92dc1 1 parent e8a130c
Nobody authored committed
Showing with 41 additions and 16 deletions.
  1. +1 −1  Makefile
  2. +39 −14 dist/css-condense.js
  3. +1 −1  dist/css-condense.min.js
View
2  Makefile
@@ -51,7 +51,7 @@ dist/css-condense.min.js: dist/css-condense.js
clean:
rm -rf dist
-dist.commit:
+dist.commit: dist
git add dist
git commit -m "Update distribution." --author "Nobody <nobody@nadarei.co>"
View
53 dist/css-condense.js
@@ -231,7 +231,7 @@
if (options.safe === true) {
options.consolidateMediaQueries = false;
options.consolidateViaSelectors = false;
- options.consolidateViaDefinitions = false;
+ options.consolidateViaDeclarations = false;
}
if (options.sort === false) {
options.sortSelectors = false;
@@ -324,10 +324,7 @@
});
return declarations.sort(function(a, b) {
function toIndex(decl) {
- var prop = decl.property;
- if (m = prop.match(/^(\-[a-z]+\-|\*|_)(.*)$/)) {
- prop = m[2];
- }
+ var prop = unvendor(decl.property);
return prop + "-" + (1e3 + decl.index);
}
return toIndex(a) > toIndex(b) ? 1 : -1;
@@ -384,10 +381,18 @@
}
function compressDeclaration(declaration) {
var self = this;
- var val;
- var values = valueSplit(declaration.property, declaration.value);
+ var val = declaration.value;
+ declaration.property = declaration.property.trim();
+ if (val.indexOf("'") === -1 && val.indexOf('"') === -1) {
+ val = val.replace(/\s*,\s*/g, ",").replace(/(\(\s*)+/g, function(str) {
+ return str.replace(/\s/g, "");
+ }).replace(/(\s*\))+/g, function(str) {
+ return str.replace(/\s/g, "");
+ });
+ }
+ var values = valueSplit(declaration.property, val);
values = values.map(function(identifier) {
- return compressIdentifier(identifier, declaration.property);
+ return compressIdentifier(identifier, declaration.property, values.length);
});
if (declaration.property === "margin" || declaration.property === "padding") {
values = compressPadding(values);
@@ -401,15 +406,16 @@
declaration.value = val;
return declaration;
}
- function compressIdentifier(identifier, property) {
+ function compressIdentifier(identifier, property, count) {
+ var zeroableProperties = [ "background", "border", "border-left", "border-right", "border-top", "border-bottom", "outline", "outline-left", "outline-right", "outline-top", "outline-bottom" ];
var m;
- if (identifier === "none" && (property === "background" || property === "border" || property === "outline")) {
+ if (identifier === "none" && zeroableProperties.indexOf(unvendor(property)) > -1 && count === 1) {
return "0";
}
if (m = identifier.match(/^url\(["'](.*?)["']\)$/)) {
return "url(" + m[1] + ")";
}
- if (m = identifier.match(/^(\.?[0-9]+|[0-9]+\.[0-9]+)?(em|px|%|in|cm|pt)$/)) {
+ if (m = identifier.match(/^(\.?[0-9]+|[0-9]+\.[0-9]+)?(%|em|ex|in|cm|mm|pt|pc|px)$/)) {
var num = m[1];
var unit = m[2];
if (num.match(/^0*\.?0*$/)) {
@@ -420,7 +426,10 @@
return num + unit;
}
}
- if (identifier.match(/^#[0-9a-f]+$/)) {
+ if (m = identifier.match(/^rgb\(([0-9]+),([0-9]+),([0-9]+)\)$/i)) {
+ identifier = rgbToHex([ m[1], m[2], m[3] ]);
+ }
+ if (identifier.match(/^#[0-9a-f]+$/i)) {
identifier = identifier.toLowerCase();
if (identifier[1] === identifier[2] && identifier[3] === identifier[4] && identifier[5] === identifier[6]) {
return "#" + identifier[1] + identifier[3] + identifier[5];
@@ -430,6 +439,22 @@
}
return identifier;
}
+ function unvendor(prop) {
+ var m;
+ if (m = prop.match(/^(?:_|\*|-[a-z]+-)(.*)$/)) {
+ return m[1];
+ } else {
+ return prop;
+ }
+ }
+ function rgbToHex(rgb) {
+ rgb = rgb.map(function(num) {
+ var str = parseInt(num).toString(16).toLowerCase();
+ if (str.length === 1) str = "0" + str;
+ return str;
+ });
+ return "#" + rgb.join("");
+ }
function compressPadding(values) {
if (values.length === 4 && values[0] === values[2] && values[1] === values[3]) {
values = [ values[0], values[1] ];
@@ -441,8 +466,8 @@
}
function compressSelector(selector) {
var re = selector;
- re = re.replace(/\s+/, " ");
- re = re.replace(/ ?([\+>~]) ?/, "$1");
+ re = re.replace(/\s+/g, " ");
+ re = re.replace(/ ?([\+>~]) ?/g, "$1");
return re;
}
function valueSplit(prop, values) {
View
2  dist/css-condense.min.js
@@ -1 +1 @@
-(function(){function b(b){return a[b]}var a={};a.debug=function(){},a["css-parse"]=function(){var a={},c=b("debug")("css-parse");return a.exports=function(a){function b(){return{stylesheet:{rules:e()}}}function c(){return f(/^{\s*/)}function d(){return f(/^}\s*/)}function e(){var b,c=[];g(),h();while(a[0]!="}"&&(b=q()||r()))h(),c.push(b);return c}function f(b){var c=b.exec(a);if(!c)return;return a=a.slice(c[0].length),c}function g(){f(/^\s*/)}function h(){while(i());}function i(){if("/"==a[0]&&"*"==a[1]){var b=2;while("*"!=a[b]&&"/"!=a[b+1])++b;return b+=2,a=a.slice(b),g(),!0}}function j(){var a=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^{])+)/);if(!a)return;var b=a[0].trim().match(/((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^,])+)/g);for(var c=0,d=b.length;c<d;++c)b[c]=b[c].trim();return b}function k(){var a=f(/^(\*?[-\w]+)\s*/);if(!a)return;a=a[0];if(!f(/^:\s*/))return;var b=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)\s*/);if(!b)return;return b=b[0].trim(),f(/^[;\s]*/),{property:a,value:b}}function l(){var a,b=[];while(a=f(/^(from|to|\d+%)\s*/))b.push(a[1]),f(/^,\s*/);if(!b.length)return;return{values:b,declarations:p()}}function m(){var a=f(/^@([-\w]+)?keyframes */);if(!a)return;var b=a[1],a=f(/^([-\w]+)\s*/);if(!a)return;var e=a[1];if(!c())return;h();var g,i=[];while(g=l())i.push(g),h();if(!d())return;return{name:e,vendor:b,keyframes:i}}function n(){var a=f(/^@media *([^{]+)/);if(!a)return;var b=a[1].trim();if(!c())return;h();var g=e();if(!d())return;return{media:b,rules:g}}function o(){var a=f(/^@import *([^;\n]+);\s*/);if(!a)return;return{"import":a[1].trim()}}function p(){var a=[];if(!c())return;h();var b;while(b=k())a.push(b),h();if(!d())return;return a}function q(){return m()||n()||o()}function r(){var a=j();if(!a)return;return h(),{selectors:a,declarations:p()}}return b()},a.exports}(),a["css-stringify"]=function(){function b(a){a=a||{},this.compress=a.compress}var a={};return a.exports=function(a,c){return(new b(c)).compile(a)},b.prototype.compile=function(a){return a.stylesheet.rules.map(this.visit.bind(this)).join(this.compress?"":"\n\n")},b.prototype.visit=function(a){return a.keyframes?this.keyframes(a):a.media?this.media(a):a.import?this.import(a):this.rule(a)},b.prototype.import=function(a){return"@import "+a.import+";"},b.prototype.media=function(a){var b=this;return this.compress?"@media "+a.media+"{"+a.rules.map(this.visit.bind(this)).join("")+"}":"@media "+a.media+" {\n"+a.rules.map(function(a){return" "+b.visit(a)}).join("\n\n")+"\n}"},b.prototype.keyframes=function(a){return this.compress?"@"+(a.vendor||"")+"keyframes "+a.name+"{"+a.keyframes.map(this.keyframe.bind(this)).join("")+"}":"@"+(a.vendor||"")+"keyframes "+a.name+" {\n"+a.keyframes.map(this.keyframe.bind(this)).join("\n")+"}"},b.prototype.keyframe=function(a){var b=this;return this.compress?a.values.join(",")+"{"+a.declarations.map(this.declaration.bind(this)).join(";")+"}":" "+a.values.join(", ")+" {\n"+a.declarations.map(function(a){return" "+b.declaration(a)}).join(";\n")+"\n }\n"},b.prototype.rule=function(a){return this.compress?a.selectors.join(",")+"{"+a.declarations.map(this.declaration.bind(this)).join(";")+"}":a.selectors.join(",\n")+" {\n"+a.declarations.map(this.declaration.bind(this)).join(";\n")+"\n}"},b.prototype.declaration=function(a){return this.compress?a.property+":"+a.value:" "+a.property+": "+a.value},a.exports}(),a["css-condense"]=function(){function c(a,c){function e(a){var b=w(a);a=b.code;var e=0;a=a.replace(/\/\*[\s\S]*?\\\*\/([\s\S]+?)\/\*[\s\S]*?\*\//g,function(a){return"#x"+e+"ie5machack{start:1}"+a+"#x"+ ++e+"ie5machack{end:1}"}),a=v(a);var g=d.parse(a);f(g);var h;return c.compress===!1?h=d.stringify(g).trim():h=d.stringify(g,{compress:!0}),h=h.replace(/\s*#x[0-9]+ie5machack{start:1}\s*/g,"/*\\*/").replace(/\s*#x[0-9]+ie5machack{end:1}\s*/g,"/**/"),c.lineBreaks===!0&&(h=h.replace(/}/g,"}\n")),h=b.comments.join("")+h,h}function f(a){g(a.stylesheet)}function g(a){var b={},c={},d={};return a.rules.forEach(function(d,e){typeof d.media!="undefined"&&n(d,a.rules,e,b),typeof d.declarations!="undefined"&&(p(d,a.rules,e),k(d,a.rules,e,c))}),a.rules.forEach(function(b,c){typeof b.declarations!="undefined"&&l(b,a.rules,c,d)}),c={},a.rules.forEach(function(b,d){typeof b.declarations!="undefined"&&(k(b,a.rules,d,c),b.selectors=h(b.selectors)),typeof b.media!="undefined"&&(b=g(b)),typeof b.keyframes!="undefined"&&b.keyframes.forEach(function(a,c){p(a,b.keyframes,c)})}),a}function h(a){var b={},c=[];return a.forEach(function(a){b[a]||(b[a]=!0,c.push(a))}),c}function i(a){return c.sortSelectors===!1?a:a.length<=1?a:a.sort()}function j(a){return c.sortDeclarations===!1?a:a.length<=1?a:(a.forEach(function(a,b){a.index=b}),a.sort(function(a,b){function c(a){var b=a.property;if(m=b.match(/^(\-[a-z]+\-|\*|_)(.*)$/))b=m[2];return b+"-"+(1e3+a.index)}return c(a)>c(b)?1:-1}))}function k(a,b,d,e){if(c.consolidateViaDeclarations===!1)return;o("selectors","declarations","last",a,b,d,e),a.selectors=i(a.selectors)}function l(a,b,d,e){if(c.consolidateViaSelectors===!1)return;o("declarations","selectors","last",a,b,d,e),a.declarations=j(a.declarations)}function n(a,b,d,e){if(c.consolidateMediaQueries===!1)return;o("rules","media","last",a,b,d,e)}function o(a,b,c,d,e,f,g){var h=JSON.stringify(d[b]);if(c=="first")typeof g[h]!="undefined"?(g[h][a]=g[h][a].concat(d[a]),delete e[f]):g[h]=d;else{if(typeof g[h]!="undefined"){var i=g[h];d[a]=i.rule[a].concat(d[a]),delete e[i.index]}g[h]={rule:d,index:f}}}function p(a,b,c){if(a.declarations.length===0){delete b[c];return}return typeof a.selectors!="undefined"&&(a.selectors=i(a.selectors.map(t))),a.declarations=j(a.declarations),a.declarations.forEach(function(a){q(a)}),a}function q(a){var b=this,c,d=u(a.property,a.value);d=d.map(function(b){return r(b,a.property)});if(a.property==="margin"||a.property==="padding")d=s(d);return a.property==="font-family"?c=d.join(","):c=d.join(" "),c=c.replace(/\s*!important$/,"!important"),a.value=c,a}function r(a,b){var c;if(a!=="none"||b!=="background"&&b!=="border"&&b!=="outline"){if(c=a.match(/^url\(["'](.*?)["']\)$/))return"url("+c[1]+")";if(c=a.match(/^(\.?[0-9]+|[0-9]+\.[0-9]+)?(em|px|%|in|cm|pt)$/)){var d=c[1],e=c[2];return d.match(/^0*\.?0*$/)?"0":(d=d.replace(/^0+/,""),d.indexOf(".")>-1&&(d=d.replace(/0+$/,"")),d+e)}return a.match(/^#[0-9a-f]+$/)?(a=a.toLowerCase(),a[1]===a[2]&&a[3]===a[4]&&a[5]===a[6]?"#"+a[1]+a[3]+a[5]:a):a}return"0"}function s(a){return a.length===4&&a[0]===a[2]&&a[1]===a[3]&&(a=[a[0],a[1]]),a.length===2&&a[0]===a[1]&&(a=[a[0]]),a}function t(a){var b=a;return b=b.replace(/\s+/," "),b=b.replace(/ ?([\+>~]) ?/,"$1"),b}function u(a,b){var c;return a==="font-family"?c=b.split(","):c=b.match(/"(?:\\"|.)*?"|'(?:\\'|.)*?'|[^ ]+/g),c=c.map(function(a){return a.trim()}),a==="font-family"&&(c=c.map(function(a){if(a.charAt(0)==='"'||a.charAt(0)==="'")a=a.substr(1,a.length-2);return a})),c}function v(a){return a.replace(/\/\*[\s\S]*?\*\//g,"")}function w(a){var b=[],c=a.replace(/\/\*![\s\S]*?\*\//g,function(a){return b.push(a.trim()+"\n"),""});return{comments:b,code:c}}c||(c={});var d={parse:b("css-parse"),stringify:b("css-stringify")};return c.safe===!0&&(c.consolidateMediaQueries=!1,c.consolidateViaSelectors=!1,c.consolidateViaDefinitions=!1),c.sort===!1&&(c.sortSelectors=!1,c.sortDeclarations=!1),e(a)}var a={};return a.exports={compress:c},a.exports}(),this.CssCondense=a["css-condense"]})()
+(function(){function b(b){return a[b]}var a={};a.debug=function(){},a["css-parse"]=function(){var a={},c=b("debug")("css-parse");return a.exports=function(a){function b(){return{stylesheet:{rules:e()}}}function c(){return f(/^{\s*/)}function d(){return f(/^}\s*/)}function e(){var b,c=[];g(),h();while(a[0]!="}"&&(b=q()||r()))h(),c.push(b);return c}function f(b){var c=b.exec(a);if(!c)return;return a=a.slice(c[0].length),c}function g(){f(/^\s*/)}function h(){while(i());}function i(){if("/"==a[0]&&"*"==a[1]){var b=2;while("*"!=a[b]&&"/"!=a[b+1])++b;return b+=2,a=a.slice(b),g(),!0}}function j(){var a=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^{])+)/);if(!a)return;var b=a[0].trim().match(/((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^,])+)/g);for(var c=0,d=b.length;c<d;++c)b[c]=b[c].trim();return b}function k(){var a=f(/^(\*?[-\w]+)\s*/);if(!a)return;a=a[0];if(!f(/^:\s*/))return;var b=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)\s*/);if(!b)return;return b=b[0].trim(),f(/^[;\s]*/),{property:a,value:b}}function l(){var a,b=[];while(a=f(/^(from|to|\d+%)\s*/))b.push(a[1]),f(/^,\s*/);if(!b.length)return;return{values:b,declarations:p()}}function m(){var a=f(/^@([-\w]+)?keyframes */);if(!a)return;var b=a[1],a=f(/^([-\w]+)\s*/);if(!a)return;var e=a[1];if(!c())return;h();var g,i=[];while(g=l())i.push(g),h();if(!d())return;return{name:e,vendor:b,keyframes:i}}function n(){var a=f(/^@media *([^{]+)/);if(!a)return;var b=a[1].trim();if(!c())return;h();var g=e();if(!d())return;return{media:b,rules:g}}function o(){var a=f(/^@import *([^;\n]+);\s*/);if(!a)return;return{"import":a[1].trim()}}function p(){var a=[];if(!c())return;h();var b;while(b=k())a.push(b),h();if(!d())return;return a}function q(){return m()||n()||o()}function r(){var a=j();if(!a)return;return h(),{selectors:a,declarations:p()}}return b()},a.exports}(),a["css-stringify"]=function(){function b(a){a=a||{},this.compress=a.compress}var a={};return a.exports=function(a,c){return(new b(c)).compile(a)},b.prototype.compile=function(a){return a.stylesheet.rules.map(this.visit.bind(this)).join(this.compress?"":"\n\n")},b.prototype.visit=function(a){return a.keyframes?this.keyframes(a):a.media?this.media(a):a.import?this.import(a):this.rule(a)},b.prototype.import=function(a){return"@import "+a.import+";"},b.prototype.media=function(a){var b=this;return this.compress?"@media "+a.media+"{"+a.rules.map(this.visit.bind(this)).join("")+"}":"@media "+a.media+" {\n"+a.rules.map(function(a){return" "+b.visit(a)}).join("\n\n")+"\n}"},b.prototype.keyframes=function(a){return this.compress?"@"+(a.vendor||"")+"keyframes "+a.name+"{"+a.keyframes.map(this.keyframe.bind(this)).join("")+"}":"@"+(a.vendor||"")+"keyframes "+a.name+" {\n"+a.keyframes.map(this.keyframe.bind(this)).join("\n")+"}"},b.prototype.keyframe=function(a){var b=this;return this.compress?a.values.join(",")+"{"+a.declarations.map(this.declaration.bind(this)).join(";")+"}":" "+a.values.join(", ")+" {\n"+a.declarations.map(function(a){return" "+b.declaration(a)}).join(";\n")+"\n }\n"},b.prototype.rule=function(a){return this.compress?a.selectors.join(",")+"{"+a.declarations.map(this.declaration.bind(this)).join(";")+"}":a.selectors.join(",\n")+" {\n"+a.declarations.map(this.declaration.bind(this)).join(";\n")+"\n}"},b.prototype.declaration=function(a){return this.compress?a.property+":"+a.value:" "+a.property+": "+a.value},a.exports}(),a["css-condense"]=function(){function c(a,c){function e(a){var b=x(a);a=b.code;var e=0;a=a.replace(/\/\*[\s\S]*?\\\*\/([\s\S]+?)\/\*[\s\S]*?\*\//g,function(a){return"#x"+e+"ie5machack{start:1}"+a+"#x"+ ++e+"ie5machack{end:1}"}),a=w(a);var g=d.parse(a);f(g);var h;return c.compress===!1?h=d.stringify(g).trim():h=d.stringify(g,{compress:!0}),h=h.replace(/\s*#x[0-9]+ie5machack{start:1}\s*/g,"/*\\*/").replace(/\s*#x[0-9]+ie5machack{end:1}\s*/g,"/**/"),c.lineBreaks===!0&&(h=h.replace(/}/g,"}\n")),h=b.comments.join("")+h,h}function f(a){g(a.stylesheet)}function g(a){var b={},c={},d={};return a.rules.forEach(function(d,e){typeof d.media!="undefined"&&m(d,a.rules,e,b),typeof d.declarations!="undefined"&&(o(d,a.rules,e),k(d,a.rules,e,c))}),a.rules.forEach(function(b,c){typeof b.declarations!="undefined"&&l(b,a.rules,c,d)}),c={},a.rules.forEach(function(b,d){typeof b.declarations!="undefined"&&(k(b,a.rules,d,c),b.selectors=h(b.selectors)),typeof b.media!="undefined"&&(b=g(b)),typeof b.keyframes!="undefined"&&b.keyframes.forEach(function(a,c){o(a,b.keyframes,c)})}),a}function h(a){var b={},c=[];return a.forEach(function(a){b[a]||(b[a]=!0,c.push(a))}),c}function i(a){return c.sortSelectors===!1?a:a.length<=1?a:a.sort()}function j(a){return c.sortDeclarations===!1?a:a.length<=1?a:(a.forEach(function(a,b){a.index=b}),a.sort(function(a,b){function c(a){var b=r(a.property);return b+"-"+(1e3+a.index)}return c(a)>c(b)?1:-1}))}function k(a,b,d,e){if(c.consolidateViaDeclarations===!1)return;n("selectors","declarations","last",a,b,d,e),a.selectors=i(a.selectors)}function l(a,b,d,e){if(c.consolidateViaSelectors===!1)return;n("declarations","selectors","last",a,b,d,e),a.declarations=j(a.declarations)}function m(a,b,d,e){if(c.consolidateMediaQueries===!1)return;n("rules","media","last",a,b,d,e)}function n(a,b,c,d,e,f,g){var h=JSON.stringify(d[b]);if(c=="first")typeof g[h]!="undefined"?(g[h][a]=g[h][a].concat(d[a]),delete e[f]):g[h]=d;else{if(typeof g[h]!="undefined"){var i=g[h];d[a]=i.rule[a].concat(d[a]),delete e[i.index]}g[h]={rule:d,index:f}}}function o(a,b,c){if(a.declarations.length===0){delete b[c];return}return typeof a.selectors!="undefined"&&(a.selectors=i(a.selectors.map(u))),a.declarations=j(a.declarations),a.declarations.forEach(function(a){p(a)}),a}function p(a){var b=this,c=a.value;a.property=a.property.trim(),c.indexOf("'")===-1&&c.indexOf('"')===-1&&(c=c.replace(/\s*,\s*/g,",").replace(/(\(\s*)+/g,function(a){return a.replace(/\s/g,"")}).replace(/(\s*\))+/g,function(a){return a.replace(/\s/g,"")}));var d=v(a.property,c);d=d.map(function(b){return q(b,a.property,d.length)});if(a.property==="margin"||a.property==="padding")d=t(d);return a.property==="font-family"?c=d.join(","):c=d.join(" "),c=c.replace(/\s*!important$/,"!important"),a.value=c,a}function q(a,b,c){var d=["background","border","border-left","border-right","border-top","border-bottom","outline","outline-left","outline-right","outline-top","outline-bottom"],e;if(a==="none"&&d.indexOf(r(b))>-1&&c===1)return"0";if(e=a.match(/^url\(["'](.*?)["']\)$/))return"url("+e[1]+")";if(e=a.match(/^(\.?[0-9]+|[0-9]+\.[0-9]+)?(%|em|ex|in|cm|mm|pt|pc|px)$/)){var f=e[1],g=e[2];return f.match(/^0*\.?0*$/)?"0":(f=f.replace(/^0+/,""),f.indexOf(".")>-1&&(f=f.replace(/0+$/,"")),f+g)}if(e=a.match(/^rgb\(([0-9]+),([0-9]+),([0-9]+)\)$/i))a=s([e[1],e[2],e[3]]);return a.match(/^#[0-9a-f]+$/i)?(a=a.toLowerCase(),a[1]===a[2]&&a[3]===a[4]&&a[5]===a[6]?"#"+a[1]+a[3]+a[5]:a):a}function r(a){var b;return(b=a.match(/^(?:_|\*|-[a-z]+-)(.*)$/))?b[1]:a}function s(a){return a=a.map(function(a){var b=parseInt(a).toString(16).toLowerCase();return b.length===1&&(b="0"+b),b}),"#"+a.join("")}function t(a){return a.length===4&&a[0]===a[2]&&a[1]===a[3]&&(a=[a[0],a[1]]),a.length===2&&a[0]===a[1]&&(a=[a[0]]),a}function u(a){var b=a;return b=b.replace(/\s+/g," "),b=b.replace(/ ?([\+>~]) ?/g,"$1"),b}function v(a,b){var c;return a==="font-family"?c=b.split(","):c=b.match(/"(?:\\"|.)*?"|'(?:\\'|.)*?'|[^ ]+/g),c=c.map(function(a){return a.trim()}),a==="font-family"&&(c=c.map(function(a){if(a.charAt(0)==='"'||a.charAt(0)==="'")a=a.substr(1,a.length-2);return a})),c}function w(a){return a.replace(/\/\*[\s\S]*?\*\//g,"")}function x(a){var b=[],c=a.replace(/\/\*![\s\S]*?\*\//g,function(a){return b.push(a.trim()+"\n"),""});return{comments:b,code:c}}c||(c={});var d={parse:b("css-parse"),stringify:b("css-stringify")};return c.safe===!0&&(c.consolidateMediaQueries=!1,c.consolidateViaSelectors=!1,c.consolidateViaDeclarations=!1),c.sort===!1&&(c.sortSelectors=!1,c.sortDeclarations=!1),e(a)}var a={};return a.exports={compress:c},a.exports}(),this.CssCondense=a["css-condense"]})()
Please sign in to comment.
Something went wrong with that request. Please try again.