Ignore initial values in text-decoration

This commit is contained in:
Xidorn Quan 2017-02-02 15:41:56 +11:00
parent 8b9dc9392b
commit c8970f7e21

View file

@ -60,14 +60,18 @@
}; };
if let DeclaredValue::Value(ref style) = *self.text_decoration_style { if let DeclaredValue::Value(ref style) = *self.text_decoration_style {
if *style != text_decoration_style::computed_value::T::solid {
try!(write!(dest, " ")); try!(write!(dest, " "));
try!(style.to_css(dest)); try!(style.to_css(dest));
} }
}
if let DeclaredValue::Value(ref color) = *self.text_decoration_color { if let DeclaredValue::Value(ref color) = *self.text_decoration_color {
if color.parsed != CSSParserColor::CurrentColor {
try!(write!(dest, " ")); try!(write!(dest, " "));
try!(color.to_css(dest)); try!(color.to_css(dest));
} }
}
Ok(()) Ok(())
} }