mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibHTML: Use an enum for CSS property ID's
Instead of using string everywhere, have the CSS parser produce enum values, since they are a lot nicer to work with. In the future we should generate most of this code based on a list of supported CSS properties.
This commit is contained in:
@@ -92,7 +92,7 @@ Color Document::background_color() const
|
||||
if (!body_layout_node)
|
||||
return Color::White;
|
||||
|
||||
auto background_color = body_layout_node->style().property("background-color");
|
||||
auto background_color = body_layout_node->style().property(CSS::PropertyID::BackgroundColor);
|
||||
if (!background_color.has_value() || !background_color.value()->is_color())
|
||||
return Color::White;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user