When a css-wide keyword is followed by more stuff, try parsing as "normal" value.

This commit is contained in:
Simon Sapin 2017-01-24 19:57:11 +01:00
parent d0ea53ade9
commit 8b0d8cbbf0
2 changed files with 3 additions and 15 deletions

View file

@ -410,7 +410,9 @@ pub enum CSSWideKeyword {
impl Parse for CSSWideKeyword {
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
match_ignore_ascii_case! { try!(input.expect_ident()),
let ident = input.expect_ident()?;
input.expect_exhausted()?;
match_ignore_ascii_case! { ident,
"initial" => Ok(CSSWideKeyword::InitialKeyword),
"inherit" => Ok(CSSWideKeyword::InheritKeyword),
"unset" => Ok(CSSWideKeyword::UnsetKeyword),