From 6a51ef9c9b6d7efed4921469c5d7d8a5c5251e0a Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 27 May 2023 13:16:18 +0100 Subject: LibWeb: Resolve accent-color property --- Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp index ab6ed5b4d3..d2e6993ec4 100644 --- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp @@ -229,6 +229,12 @@ static ErrorOr> style_value_for_size(Size const& ErrorOr> ResolvedCSSStyleDeclaration::style_value_for_property(Layout::NodeWithStyle const& layout_node, PropertyID property_id) const { switch (property_id) { + case PropertyID::AccentColor: { + auto accent_color = layout_node.computed_values().accent_color(); + if (accent_color.has_value()) + return TRY(ColorStyleValue::create(accent_color.value())); + return TRY(IdentifierStyleValue::create(ValueID::Auto)); + } case PropertyID::Background: { auto maybe_background_color = property(PropertyID::BackgroundColor); auto maybe_background_image = property(PropertyID::BackgroundImage); -- cgit v1.2.3