diff --git a/src/printer.js b/src/printer.js index 7dd532fa..5bcb46d7 100644 --- a/src/printer.js +++ b/src/printer.js @@ -2648,7 +2648,14 @@ function genericPrintNoParens(path, options, print, args) { n.groups[i + 1].raws && n.groups[i + 1].raws.before !== "" ) { - parts.push(line); + if ( + n.groups[i + 1].type === "value-operator" && + ["+", "-", "/", "*", "%"].indexOf(n.groups[i + 1].value) !== -1 + ) { + parts.push(" "); + } else { + parts.push(line); + } } } diff --git a/tests/css_indent/__snapshots__/jsfmt.spec.js.snap b/tests/css_indent/__snapshots__/jsfmt.spec.js.snap index b0a2fc1f..b854b11f 100644 --- a/tests/css_indent/__snapshots__/jsfmt.spec.js.snap +++ b/tests/css_indent/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`indent.css 1`] = ` div { background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y; box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15); + padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new)); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ div { @@ -14,6 +15,10 @@ div { repeat-y; box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15); + padding-bottom: calc( + var(ads-help-tray-footer-with-support-link-height) + + var(ads-help-tray-header-height-new) + ); } `; diff --git a/tests/css_indent/indent.css b/tests/css_indent/indent.css index 075f78ad..28636d82 100644 --- a/tests/css_indent/indent.css +++ b/tests/css_indent/indent.css @@ -1,4 +1,5 @@ div { background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y; box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15); + padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new)); }