From c8970f7e21119907e497ef7fc0137b399e9c1636 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 2 Feb 2017 15:41:56 +1100 Subject: [PATCH] Ignore initial values in text-decoration --- components/style/properties/shorthand/text.mako.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/style/properties/shorthand/text.mako.rs b/components/style/properties/shorthand/text.mako.rs index 24813d34d44..2be6bd80867 100644 --- a/components/style/properties/shorthand/text.mako.rs +++ b/components/style/properties/shorthand/text.mako.rs @@ -60,13 +60,17 @@ }; if let DeclaredValue::Value(ref style) = *self.text_decoration_style { - try!(write!(dest, " ")); - try!(style.to_css(dest)); + if *style != text_decoration_style::computed_value::T::solid { + try!(write!(dest, " ")); + try!(style.to_css(dest)); + } } if let DeclaredValue::Value(ref color) = *self.text_decoration_color { - try!(write!(dest, " ")); - try!(color.to_css(dest)); + if color.parsed != CSSParserColor::CurrentColor { + try!(write!(dest, " ")); + try!(color.to_css(dest)); + } } Ok(())