mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:34:59 +00:00
LibWeb: Support cellpadding
attribute on table
elements
This commit is contained in:
parent
3d1fbcb26b
commit
00c1da8cbc
5 changed files with 75 additions and 0 deletions
|
@ -85,7 +85,16 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
|||
}
|
||||
});
|
||||
auto const& table_element = table_containing_cell(*this);
|
||||
|
||||
if (auto padding = table_element.padding()) {
|
||||
style.set_property(CSS::PropertyID::PaddingTop, CSS::LengthStyleValue::create(CSS::Length::make_px(padding)));
|
||||
style.set_property(CSS::PropertyID::PaddingBottom, CSS::LengthStyleValue::create(CSS::Length::make_px(padding)));
|
||||
style.set_property(CSS::PropertyID::PaddingLeft, CSS::LengthStyleValue::create(CSS::Length::make_px(padding)));
|
||||
style.set_property(CSS::PropertyID::PaddingRight, CSS::LengthStyleValue::create(CSS::Length::make_px(padding)));
|
||||
}
|
||||
|
||||
auto border = table_element.border();
|
||||
|
||||
if (!border)
|
||||
return;
|
||||
auto apply_border_style = [&](CSS::PropertyID style_property, CSS::PropertyID width_property, CSS::PropertyID color_property) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue