Kill define_numbered_css_keyword_enum

This commit is contained in:
Anthony Ramine 2018-01-30 10:13:15 +01:00
parent 1f8777bb0b
commit bac8781cc7
6 changed files with 45 additions and 74 deletions

View file

@ -9,9 +9,13 @@ ${helpers.four_sides_shorthand("border-color", "border-%s-color", "specified::Co
spec="https://drafts.csswg.org/css-backgrounds/#border-color",
allow_quirks=True)}
${helpers.four_sides_shorthand("border-style", "border-%s-style",
"specified::BorderStyle::parse",
spec="https://drafts.csswg.org/css-backgrounds/#border-style")}
${helpers.four_sides_shorthand(
"border-style",
"border-%s-style",
"specified::BorderStyle::parse",
needs_context=False,
spec="https://drafts.csswg.org/css-backgrounds/#border-style",
)}
<%helpers:shorthand name="border-width" sub_properties="${
' '.join('border-%s-width' % side
@ -63,7 +67,7 @@ pub fn parse_border<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
}
}
if style.is_none() {
if let Ok(value) = input.try(|i| BorderStyle::parse(context, i)) {
if let Ok(value) = input.try(BorderStyle::parse) {
style = Some(value);
any = true;
continue