mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Detect var() in shorthand declarations.
This commit is contained in:
parent
6ed5b561df
commit
40e6cc118e
4 changed files with 13 additions and 127 deletions
|
@ -270,6 +270,8 @@ fn parse_var_function<'i, 't>(input: &mut Parser<'i, 't>,
|
|||
let name = try!(input.expect_ident());
|
||||
let name = try!(parse_name(&name));
|
||||
if input.try(|input| input.expect_comma()).is_ok() {
|
||||
// Exclude `!` and `;` at the top level
|
||||
// https://drafts.csswg.org/css-syntax/#typedef-declaration-value
|
||||
try!(input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
|
||||
// At least one non-comment token.
|
||||
try!(input.next_including_whitespace());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue