Remove many spaces from media query (#1776)

The issue is really that the media query parser fails to parse the inner queries and just gives a raw string for the expression, but it should be safe to remove extra spaces. I can't make it rmeove spaces inside () that way unfortunately :(
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-05-27 13:32:27 -07:00
1 parent 48d35503c4
commit 375540efac
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -2568,7 +2568,7 @@ function genericPrintNoParens(path, options, print, args) {
return concat(["(", concat(path.map(print, "nodes")), ")"]);
}
case "media-feature": {
return n.value;
return n.value.replace(/ +/g, ' ');
}
case "media-colon": {
return concat([n.value, " "]);
@@ -26,10 +26,10 @@ exports[`at-media.css 1`] = `
@media not all and (monochrome) {
}
@media (not all) and (monochrome) {
@media (not all) and (monochrome) {
}
@media (not ( screen and ( color ) )), print and (color) {
@media (not ( screen and ( color ) )), print and (color) {
}
@media screen and (device-aspect-ratio: 16/9), screen and (device-aspect-ratio: 16/10) {
@@ -13,7 +13,7 @@ exports[`media-queries-ranges.css 1`] = `
color: red;
}
}
@custom-media --only-medium-screen (width >=500px) and (width<= 1200px);
@custom-media --only-medium-screen (width >=500px) and (width<= 1200px);
@media (--only-medium-screen) {
.rule {
color: blue;