diff options
-rw-r--r-- | components/style/properties/shorthands/border.mako.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/style/properties/shorthands/border.mako.rs b/components/style/properties/shorthands/border.mako.rs index 1f77b905021..e5122153db7 100644 --- a/components/style/properties/shorthands/border.mako.rs +++ b/components/style/properties/shorthands/border.mako.rs @@ -70,11 +70,10 @@ pub fn parse_border<'i, 't>( let mut width = None; let mut any = false; loop { - if color.is_none() { - if let Ok(value) = input.try(|i| Color::parse(context, i)) { - color = Some(value); + if width.is_none() { + if let Ok(value) = input.try(|i| BorderSideWidth::parse(context, i)) { + width = Some(value); any = true; - continue } } if style.is_none() { @@ -84,9 +83,9 @@ pub fn parse_border<'i, 't>( continue } } - if width.is_none() { - if let Ok(value) = input.try(|i| BorderSideWidth::parse(context, i)) { - width = Some(value); + if color.is_none() { + if let Ok(value) = input.try(|i| Color::parse(context, i)) { + color = Some(value); any = true; continue } |