1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibWeb: Add 'object-fit' property

This patch adds support for the 'object-fit' CSS property. :^)
This commit is contained in:
Tobias Christiansen 2023-08-01 20:06:50 +02:00 committed by Sam Atkins
parent 86ad896f35
commit 5fc6bff582
6 changed files with 24 additions and 0 deletions

View file

@ -937,6 +937,12 @@ String StyleProperties::grid_area() const
return value->as_string().to_string().release_value_but_fixme_should_propagate_errors();
}
Optional<CSS::ObjectFit> StyleProperties::object_fit() const
{
auto value = property(CSS::PropertyID::ObjectFit);
return value_id_to_object_fit(value->to_identifier());
}
Color StyleProperties::stop_color() const
{
auto value = property(CSS::PropertyID::StopColor);