Skip to content

Commit 50eb370

Browse files
committed
Print spaces in parenthesized CSS media feature expressions
1 parent f8c3ce0 commit 50eb370

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/language-css/printer-postcss.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,17 @@ function genericPrint(path, options, print) {
273273
return adjustNumbers(adjustStrings(node.value, options));
274274
}
275275
case "media-feature-expression": {
276+
const parenSpace = options.parenSpacing ? " " : "";
276277
if (!node.nodes) {
277278
return node.value;
278279
}
279-
return concat(["(", concat(path.map(print, "nodes")), ")"]);
280+
return concat([
281+
"(",
282+
parenSpace,
283+
concat(path.map(print, "nodes")),
284+
parenSpace,
285+
")"
286+
]);
280287
}
281288
case "media-feature": {
282289
return maybeToLowerCase(

0 commit comments

Comments
 (0)