diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-05-27 13:16:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-27 20:55:00 +0200 |
commit | 6a51ef9c9b6d7efed4921469c5d7d8a5c5251e0a (patch) | |
tree | 4319c998080be79bdb93cae015c7f11d9ea11ada | |
parent | 0374b42f201836400ba74a9891eb56ef9561f859 (diff) | |
download | serenity-6a51ef9c9b6d7efed4921469c5d7d8a5c5251e0a.zip |
LibWeb: Resolve accent-color property
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<NonnullRefPtr<StyleValue const>> style_value_for_size(Size const& ErrorOr<RefPtr<StyleValue const>> 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); |