1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:18:11 +00:00

LibWeb: Parse and plumb the accent-color CSS property

This commit is contained in:
MacDue 2023-03-18 20:49:00 +01:00 committed by Sam Atkins
parent d005b1ad1b
commit 87b8a36e56
5 changed files with 26 additions and 0 deletions

View file

@ -375,6 +375,14 @@ CSS::TransformOrigin StyleProperties::transform_origin() const
return { x_value.value(), y_value.value() };
}
Optional<Color> StyleProperties::accent_color(Layout::NodeWithStyle const& node) const
{
auto value = property(CSS::PropertyID::AccentColor);
if (value->has_color())
return value->to_color(node);
return {};
}
Optional<CSS::AlignContent> StyleProperties::align_content() const
{
auto value = property(CSS::PropertyID::AlignContent);