LibWeb/CSS: Parse border-block-* properties

This doesn't currently honor `writing-mode`, `direction` and
`text-orientation`.
This commit is contained in:
Tim Ledbetter 2025-03-10 23:16:50 +00:00 committed by Sam Atkins
parent cd1bba353a
commit e011ddd368
Notes: github-actions[bot] 2025-03-14 16:10:08 +00:00
18 changed files with 511 additions and 144 deletions

View file

@ -194,8 +194,8 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
// The resolved value for a given longhand property can be determined as follows:
switch (property_id) {
// -> background-color
// FIXME: -> border-block-end-color
// FIXME: -> border-block-start-color
// -> border-block-end-color
// -> border-block-start-color
// -> border-bottom-color
// -> border-inline-end-color
// -> border-inline-start-color
@ -210,6 +210,12 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
// The resolved value is the used value.
case PropertyID::BackgroundColor:
return CSSColorValue::create_from_color(layout_node.computed_values().background_color(), ColorSyntax::Modern);
case PropertyID::BorderBlockEndColor:
// FIXME: Honor writing-mode, direction and text-orientation.
return style_value_for_property(layout_node, PropertyID::BorderBottomColor);
case PropertyID::BorderBlockStartColor:
// FIXME: Honor writing-mode, direction and text-orientation.
return style_value_for_property(layout_node, PropertyID::BorderTopColor);
case PropertyID::BorderBottomColor:
return CSSColorValue::create_from_color(layout_node.computed_values().border_bottom().color, ColorSyntax::Modern);
case PropertyID::BorderInlineEndColor: