Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick "WIP: Add support for cascade layers (CSS @layer rules)" #25107

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nico
Copy link
Contributor

@nico nico commented Oct 11, 2024

Depending on usage, `@layer` has two forms, with two different CSSOM
types. One simply lists layer names and the other defines a layer with
its contained rules.

(cherry picked from commit 1c6133aa523fe29c25b11284d8b3353de0a03c0f)
This causes us to pass all of
http://wpt.live/css/css-cascade/parsing/layer.html :^)

(cherry picked from commit 4c98906e2c00200d7652abf7df5c044fab64dbfc)
I didn't want to add another set of boilerplatey tree-walking methods,
so here's a general-purpose one. :^)

`for_each_effective_rule()` walks the tree of effective style rules, and
runs the callback on each one, in either pre- or postorder.  The
previous `for_each_effective_style/keyframes_rule()` methods of
`CSSStyleSheet` are then reimplemented in terms of
`for_each_effective_rule()`, and we can get rid of their equivalents
elsewhere.

(cherry picked from commit cbb4be3e5e266da09d145435fe8279a83099f363)
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Oct 11, 2024
@nico nico marked this pull request as draft October 15, 2024 01:35
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants