mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: @container rules should support not without parentheses
We are currently detect 'not' as part of the container-name. Differential Revision: https://phabricator.services.mozilla.com/D159836
This commit is contained in:
parent
f14f1fa440
commit
b89c2be4bd
1 changed files with 6 additions and 7 deletions
|
@ -1499,7 +1499,7 @@ bitflags! {
|
||||||
/// TODO: block-size is on the spec but it seems it was removed? WPTs don't
|
/// TODO: block-size is on the spec but it seems it was removed? WPTs don't
|
||||||
/// support it, see https://github.com/w3c/csswg-drafts/issues/7179.
|
/// support it, see https://github.com/w3c/csswg-drafts/issues/7179.
|
||||||
pub struct ContainerType: u8 {
|
pub struct ContainerType: u8 {
|
||||||
/// The `none` variant.
|
/// The `normal` variant.
|
||||||
const NORMAL = 0;
|
const NORMAL = 0;
|
||||||
/// The `inline-size` variant.
|
/// The `inline-size` variant.
|
||||||
const INLINE_SIZE = 1 << 0;
|
const INLINE_SIZE = 1 << 0;
|
||||||
|
@ -1561,12 +1561,11 @@ impl Parse for ContainerName {
|
||||||
first,
|
first,
|
||||||
DISALLOWED_CONTAINER_NAMES,
|
DISALLOWED_CONTAINER_NAMES,
|
||||||
)?);
|
)?);
|
||||||
while let Ok(ident) = input.try_parse(|input| input.expect_ident_cloned()) {
|
while let Ok(name) = input.try_parse(|input| {
|
||||||
idents.push(CustomIdent::from_ident(
|
let ident = input.expect_ident()?;
|
||||||
location,
|
CustomIdent::from_ident(location, &ident, DISALLOWED_CONTAINER_NAMES)
|
||||||
&ident,
|
}) {
|
||||||
DISALLOWED_CONTAINER_NAMES,
|
idents.push(name);
|
||||||
)?);
|
|
||||||
}
|
}
|
||||||
Ok(ContainerName(idents.into()))
|
Ok(ContainerName(idents.into()))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue