style: Hook up basic @layer rule parsing

Disabled, and of course doing nothing for now still, but this is another
piece that is useful to get reviewed separately.

Don't allow layers to be interleaved with @import / @namespace rules as
per https://github.com/w3c/csswg-drafts/issues/6522.

Differential Revision: https://phabricator.services.mozilla.com/D124229
This commit is contained in:
Emilio Cobos Álvarez 2023-05-26 15:16:47 +02:00 committed by Oriol Brufau
parent 623c8d8d45
commit dbb51abc62
3 changed files with 68 additions and 49 deletions

View file

@ -372,8 +372,7 @@ impl CssRule {
// CssRule::Charset(..) => State::Start,
CssRule::Import(..) => State::Imports,
CssRule::Namespace(..) => State::Namespaces,
// TODO(emilio): We'll need something here for non-block layer
// rules.
// TODO(emilio): Do we need something for EarlyLayers?
_ => State::Body,
}
}