Skip to content

Commit

Permalink
Print spaces in parenthesized CSS media feature expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Feb 4, 2019
1 parent f8c3ce0 commit 50eb370
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/language-css/printer-postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,17 @@ function genericPrint(path, options, print) {
return adjustNumbers(adjustStrings(node.value, options));
}
case "media-feature-expression": {
const parenSpace = options.parenSpacing ? " " : "";
if (!node.nodes) {
return node.value;
}
return concat(["(", concat(path.map(print, "nodes")), ")"]);
return concat([
"(",
parenSpace,
concat(path.map(print, "nodes")),
parenSpace,
")"
]);
}
case "media-feature": {
return maybeToLowerCase(
Expand Down

0 comments on commit 50eb370

Please sign in to comment.