mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibWeb: Add CSS support for border-spacing property
This commit is contained in:
parent
f662a452c9
commit
396f1a977c
5 changed files with 31 additions and 0 deletions
|
@ -379,6 +379,24 @@ Optional<CSS::ImageRendering> StyleProperties::image_rendering() const
|
|||
return value_id_to_image_rendering(value->to_identifier());
|
||||
}
|
||||
|
||||
CSS::Length StyleProperties::border_spacing_horizontal() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::BorderSpacing);
|
||||
if (value->is_length())
|
||||
return value->as_length().length();
|
||||
auto const& list = value->as_value_list();
|
||||
return list.value_at(0, false)->as_length().length();
|
||||
}
|
||||
|
||||
CSS::Length StyleProperties::border_spacing_vertical() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::BorderSpacing);
|
||||
if (value->is_length())
|
||||
return value->as_length().length();
|
||||
auto const& list = value->as_value_list();
|
||||
return list.value_at(1, false)->as_length().length();
|
||||
}
|
||||
|
||||
Optional<CSS::CaptionSide> StyleProperties::caption_side() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::CaptionSide);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue