From 3e49a8c80ab639cefd1ae3947deb16bbfdf60ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 3 Jul 2017 11:46:40 -0700 Subject: [PATCH] Fix serialization of grid-template If both columns and rows are 'none', shorthand should serialize it as 'none / none' instead of just 'none'. --- .../style/properties/shorthand/position.mako.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/components/style/properties/shorthand/position.mako.rs b/components/style/properties/shorthand/position.mako.rs index 88d51a1a179..a862cc20e04 100644 --- a/components/style/properties/shorthand/position.mako.rs +++ b/components/style/properties/shorthand/position.mako.rs @@ -367,14 +367,9 @@ dest: &mut W) -> fmt::Result where W: fmt::Write { match *template_areas { Either::Second(_none) => { - if template_rows == &GenericGridTemplateComponent::None && - template_columns == &GenericGridTemplateComponent::None { - dest.write_str("none") - } else { - template_rows.to_css(dest)?; - dest.write_str(" / ")?; - template_columns.to_css(dest) - } + template_rows.to_css(dest)?; + dest.write_str(" / ")?; + template_columns.to_css(dest) }, Either::First(ref areas) => { let track_list = match *template_rows {