mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Don't allow auto in grid line names.
See https://github.com/w3c/csswg-drafts/issues/2856. Differential Revision: https://phabricator.services.mozilla.com/D9882
This commit is contained in:
parent
26040d1b00
commit
a9af61e3be
2 changed files with 4 additions and 2 deletions
|
@ -120,7 +120,9 @@ impl Parse for GridLine<specified::Integer> {
|
|||
if val_before_span || grid_line.ident.is_some() {
|
||||
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||
}
|
||||
grid_line.ident = Some(CustomIdent::from_ident(location, &name, &[])?);
|
||||
// NOTE(emilio): `span` is consumed above, so we only need to
|
||||
// reject `auto`.
|
||||
grid_line.ident = Some(CustomIdent::from_ident(location, &name, &["auto"])?);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ pub fn parse_line_names<'i, 't>(
|
|||
while let Ok((loc, ident)) = input.try(|i| -> Result<_, CssParseError<()>> {
|
||||
Ok((i.current_source_location(), i.expect_ident_cloned()?))
|
||||
}) {
|
||||
let ident = CustomIdent::from_ident(loc, &ident, &["span"])?;
|
||||
let ident = CustomIdent::from_ident(loc, &ident, &["span", "auto"])?;
|
||||
values.push(ident);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue