Commit graph

13 commits

Author SHA1 Message Date
Sam Atkins
c2f0d61eb6 LibWeb/CSS: Implement initial parsing for @container rules
The main limitation here are that none of the container-query features
are parsed in a meaningful way; they all become `<general-enclosed>`.
Parsing for them will be added as they are implemented.
2026-03-30 14:49:24 +01:00
Sam Atkins
214d2b5e1f LibWeb/CSS: Implement CSSContainerRule
No parsing yet, just CSSContainerRule and the supporting ContainerQuery
class.

CSSContainerRule is unusual in how it matches, because instead of it
either matching or not matching globally, it instead is matched against
a specific element. But also, some at-rules inside it always apply, as
if they were written outside it. This doesn't fit well with how
CSSConditionRule is implemented, and will likely require some rework
later. For now, `condition_matches()` always returns false, and
`for_each_effective_rule()` is overridden to always process those
global at-rules and nothing else.
2026-03-30 14:49:24 +01:00
Callum Law
c7b402eff5 LibWeb: Parse @function rules 2026-03-27 11:19:28 +00:00
Callum Law
7d158c47d1 LibWeb: Implement CSSFunctionDeclarations
We also define it as a valid `NestedDeclarationsRule` for the relevant
functions
2026-03-27 11:19:28 +00:00
Callum Law
19c8eb4146 LibWeb: Implement CSSFunctionRule
Parsing/using this rule will come in later commits
2026-03-27 11:19:28 +00:00
Callum Law
6d73a3e85f LibWeb: Parse @font-feature-values at-rule
We don't yet support the `font-display` descriptor as part of this
2026-02-17 12:25:27 +00:00
Callum Law
784911fb6d LibWeb: Implement CSSFontFeatureValuesRule 2026-02-17 12:25:27 +00:00
Callum Law
703259a24c LibWeb: Parse and serialize @counter-style rule
We don't yet parse or serialize any of the descriptors in the rule, just
the rule itself and the name
2026-02-03 09:58:47 +00:00
Tim Ledbetter
191e0e8c18 LibWeb: Support @-webkit-keyframes as an alias for @keyframes
This is listed as mandatory in the compat spec.
2026-01-25 09:33:24 +01:00
Sam Atkins
870f24f181 LibWeb/CSS: Add basic implementation of CSSMarginRule
This is a bit under-specced, specifically there's no definition of
CSSMarginDescriptors so I've gone with CSSStyleProperties for now. Gets
us 17 WPT subtests.
2025-05-16 11:01:39 +01:00
Sam Atkins
aa9fa88428 LibWeb/CSS: Treat at-rule names insensitively to determine context type
`@MeDiA` is entirely valid.
2025-05-16 11:01:39 +01:00
Sam Atkins
aaf07ae30d LibWeb: Add basic implementation of @page
This doesn't support selectors, and the only descriptors for now are for
margins.
2025-05-15 09:53:29 +01:00
Sam Atkins
763b1b0ee2 LibWeb/CSS: Move RuleContext type out of Parser.h
This was previously internal to the Parser, but we'd like to pass it in
from outside.
2025-04-23 10:55:45 +01:00