Add space around ~ combinator (#1774)

master
Christopher Chedeau 2017-05-27 13:20:32 -07:00 committed by GitHub
parent 54497a0865
commit adb26e20ad
6 changed files with 16 additions and 3 deletions

View File

@ -2612,7 +2612,7 @@ function genericPrintNoParens(path, options, print, args) {
]); ]);
} }
case "selector-combinator": { case "selector-combinator": {
if (n.value === "+" || n.value === ">") { if (n.value === "+" || n.value === ">" || n.value === "~") {
return concat([" ", n.value, " "]); return concat([" ", n.value, " "]);
} }
return n.value; return n.value;

View File

@ -0,0 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`combinator.css 1`] = `
-Option/root .public/section ~ .public/section:before {
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Option/root .public/section ~ .public/section:before {
}
`;

View File

@ -0,0 +1,2 @@
-Option/root .public/section ~ .public/section:before {
}

View File

@ -0,0 +1 @@
run_spec(__dirname, { parser: "postcss" });