Allow long media rules to break (#2219)

Fixes #2198
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-06-21 13:02:16 -07:00
1 parent e8fb9bddf7
commit 313519d8ae
5 files changed
+23 -3

No files matched your search

+1 -1
View File
@@ -141,7 +141,7 @@ function genericPrint(path, options, print) {
}
parts.push(childPath.call(print));
}, "nodes");
return join(", ", parts);
return group(indent(join(concat([",", line]), parts)));
}
case "media-query": {
return join(" ", path.map(print, "nodes"));
@@ -0,0 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`overflow.css 1`] = `
@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@media all and (-webkit-min-device-pixel-ratio: 1.5),
all and (-o-min-device-pixel-ratio: 3/2),
all and (min--moz-device-pixel-ratio: 1.5),
all and (min-device-pixel-ratio: 1.5) {
}
`;
+1
View File
@@ -0,0 +1 @@
run_spec(__dirname, { parser: "postcss" });
+2
View File
@@ -0,0 +1,2 @@
@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {
}
@@ -26,10 +26,14 @@ exports[`at-media.css 1`] = `
}
@media (not ( screen and ( color ) )), print and (color) {
}
@media screen and (device-aspect-ratio: 16/9), screen and (device-aspect-ratio: 16/10) {
@media screen and (device-aspect-ratio: 16/9),
screen and (device-aspect-ratio: 16/10) {
}
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi) {
@media (-webkit-min-device-pixel-ratio: 2),
(min--moz-device-pixel-ratio: 2),
(min-resolution: 2dppx),
(min-resolution: 192dpi) {
}
`;