ladybird/Libraries/LibWeb/CSS/Parser
Sam Atkins 26acd897bf LibWeb: Produce computed values for custom properties
Custom properties are required to produce a computed value just like
regular properties. The computed value is defined in the spec as
"specified value with variables substituted, or the guaranteed-invalid
value", though in reality all arbitrary substitution functions should be
substituted, not just `var()`.

To support this, we parse the CSS-wide keywords normally in custom
properties, instead of ignoring them. We don't yet handle all of them
properly, and because that will require us to cascade them like regular
properties. This is just enough to prevent regressions when implementing
ASFs.

Our output in this new test is not quite correct, because of the awkward
way we handle whitespace in property values - so it has 3 spaces in the
middle instead of 1, until that's fixed.

It's possible this computed-value production should go in
cascade_custom_properties(), but I had issues with that. Hopefully once
we start cascading custom properties properly, it'll be clearer how
this should all work.
2025-07-09 16:44:20 +01:00
..
ComponentValue.cpp LibWeb/CSS: Include guaranteed-invalid value in ComponentValue 2025-07-09 16:44:20 +01:00
ComponentValue.h LibWeb/CSS: Include guaranteed-invalid value in ComponentValue 2025-07-09 16:44:20 +01:00
DescriptorParsing.cpp LibWeb/CSS: Don't remove whitespace early when parsing descriptor values 2025-07-03 08:22:30 +01:00
Dimension.h LibWeb/CSS: Add Parser::Dimension::to_string() 2024-12-18 12:21:22 +00:00
GradientParsing.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Helpers.cpp LibWeb/CSS: Make @page selector parsing accessible 2025-05-16 16:42:10 +01:00
MediaParsing.cpp LibWeb/CSS: Treat block at-rules with no block as invalid 2025-06-25 09:02:45 +02:00
Parser.cpp LibWeb: Treat a CSS declaration with a "--" property name as invalid 2025-06-25 17:09:29 +01:00
Parser.h LibWeb: Produce computed values for custom properties 2025-07-09 16:44:20 +01:00
PropertyParsing.cpp LibWeb: Produce computed values for custom properties 2025-07-09 16:44:20 +01:00
RuleContext.cpp LibWeb/CSS: Add basic implementation of CSSMarginRule 2025-05-16 11:01:39 +01:00
RuleContext.h LibWeb/CSS: Add basic implementation of CSSMarginRule 2025-05-16 11:01:39 +01:00
RuleParsing.cpp LibWeb/CSS: Treat block at-rules with no block as invalid 2025-06-25 09:02:45 +02:00
SelectorParsing.cpp LibWeb: Treat CSS selectors containing undeclared namespaces as invalid 2025-06-24 12:51:12 +01:00
Token.cpp LibWeb/CSS: Construct all CSS Tokens in a consistent way 2025-07-09 15:04:57 +01:00
Token.h LibWeb/CSS: Construct all CSS Tokens in a consistent way 2025-07-09 15:04:57 +01:00
Tokenizer.cpp LibWeb/CSS: Stop converting at-rule names to lowercase 2025-07-09 15:04:57 +01:00
Tokenizer.h LibWeb/CSS: Construct all CSS Tokens in a consistent way 2025-07-09 15:04:57 +01:00
TokenStream.h LibWeb/CSS: When dumping CSS tokens, point at the next one 2025-05-23 19:39:23 +01:00
Types.cpp LibWeb/CSS: Move functions for detecting var()/attr() into Token types 2025-03-28 09:15:02 +00:00
Types.h LibWeb/CSS: Include guaranteed-invalid value in ComponentValue 2025-07-09 16:44:20 +01:00
ValueParsing.cpp LibWeb: Produce computed values for custom properties 2025-07-09 16:44:20 +01:00