Add space around ~ combinator (#1774)
parent
54497a0865
commit
adb26e20ad
|
@ -2612,7 +2612,7 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
]);
|
||||
}
|
||||
case "selector-combinator": {
|
||||
if (n.value === "+" || n.value === ">") {
|
||||
if (n.value === "+" || n.value === ">" || n.value === "~") {
|
||||
return concat([" ", n.value, " "]);
|
||||
}
|
||||
return n.value;
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
`;
|
|
@ -0,0 +1,2 @@
|
|||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, { parser: "postcss" });
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`custom-properties.css 1`] = `
|
||||
:root{--mainColor:#123456}
|
||||
a{color:var ( --mainColor ) ; }
|
||||
a{color:var( --mainColor ) ; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
:root {
|
||||
--mainColor: #123456;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`var-notation.css 1`] = `
|
||||
.foo {margin:var ( --n-gutterSize) 0 var ( --gutterSize ) var( --n-gutterSize );
|
||||
.foo {margin:var( --n-gutterSize) 0 var( --gutterSize ) var( --n-gutterSize );
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.foo {
|
||||
|
|
Loading…
Reference in New Issue