Preserve space before parens (#1806)

master
Christopher Chedeau 2017-05-29 12:41:04 -07:00 committed by GitHub
parent 2e9ea8f223
commit 27df0f81f5
4 changed files with 39 additions and 0 deletions

View File

@ -2786,6 +2786,9 @@ function genericPrintNoParens(path, options, print, args) {
return concat([n.value, path.call(print, "group")]);
}
case "value-paren": {
if (n.raws.before !== "") {
return concat([line, n.value]);
}
return n.value;
}
case "value-number": {

View File

@ -0,0 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`parens.js 1`] = `
a {
box-shadow: inset 0 $size $size (-$size) black;
width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2);
padding-right: (100% * $info-width / (1 - $image-width));
padding-bottom:
(
100% *
$image-height / ($image-width-responsive + $image-margin-responsive * 2)
);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a {
box-shadow: inset 0 $size $size (-$size) black;
width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2);
padding-right: (100% * $info-width / (1 - $image-width));
padding-bottom: (
100% *
$image-height / ($image-width-responsive + $image-margin-responsive * 2)
);
}
`;

View File

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

View File

@ -0,0 +1,10 @@
a {
box-shadow: inset 0 $size $size (-$size) black;
width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2);
padding-right: (100% * $info-width / (1 - $image-width));
padding-bottom:
(
100% *
$image-height / ($image-width-responsive + $image-margin-responsive * 2)
);
}