style: Fix one minor serialization issue which was causing test failures.

We were serializing calc(10% + 4px) as calc(10% + calc(4px)).

Differential Revision: https://phabricator.services.mozilla.com/D63400
This commit is contained in:
Emilio Cobos Álvarez 2020-02-21 00:47:00 +00:00
parent c0f2a4e785
commit 039ef3dd53

View file

@ -454,10 +454,10 @@ impl<L: CalcNodeLeaf> CalcNode<L> {
dest.write_str(" - ")?; dest.write_str(" - ")?;
let mut c = child.clone(); let mut c = child.clone();
c.negate(); c.negate();
c.to_css(dest)?; c.to_css_impl(dest, false)?;
} else { } else {
dest.write_str(" + ")?; dest.write_str(" + ")?;
child.to_css(dest)?; child.to_css_impl(dest, false)?;
} }
} else { } else {
first = false; first = false;