rm-mediaquery
v0.0.2
Published
remove all mediaquery from a stylesheet
Downloads
2
Readme
var styleStr_regular = '' + '.regular {\n' + ' color:black;\n' + '}\n' + '@media screen and (max-width: 1025px) {\n' + ' .container .grid1 { display: none; }\n' + '}\n' + '.regular2 {\n' + ' color:red;\n' + '}\n' + '@media screen and (max-width: 900px) {\n' + ' @media screen and (max-width: 500px) {\n' + ' .container .grid1 { display: none; }\n' + ' }\n' + '}\n';
console.log(rmMediaquery(styleStr_regular)); //.regular { // color:black; //} // //.regular2 { // color:red; //}
function rmMedia (str) { if (str.match(endMediaRe)) { return str.split(endMediaRe).map(rmMedia).join(' '); } else { return str.replace(bgnMediaRe, ' '); } }