Serialize spread in shadow conditionally.

This commit is contained in:
Xidorn Quan 2017-06-07 13:16:57 +10:00
parent 828665a6af
commit e659fa6c23
2 changed files with 9 additions and 5 deletions

View file

@ -888,9 +888,10 @@ impl ToCss for Shadow {
self.offset_y.to_css(dest)?;
dest.write_str(" ")?;
self.blur_radius.to_css(dest)?;
dest.write_str(" ")?;
self.spread_radius.to_css(dest)?;
if self.spread_radius != Length::zero() {
dest.write_str(" ")?;
self.spread_radius.to_css(dest)?;
}
if let Some(ref color) = self.color {
dest.write_str(" ")?;
color.to_css(dest)?;