mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Resolve accent-color property
This commit is contained in:
committed by
Andreas Kling
parent
0374b42f20
commit
6a51ef9c9b
Notes:
sideshowbarker
2024-07-17 07:20:49 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/6a51ef9c9b Pull-request: https://github.com/SerenityOS/serenity/pull/19092
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user