mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
LibWeb: Use LibwebLeft and LibwebRight to align table cells
This commit is contained in:
parent
ccea69ad40
commit
5df52a5082
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/implicitfield
Commit: 5df52a5082
Pull-request: https://github.com/SerenityOS/serenity/pull/22000
Reviewed-by: https://github.com/kalenikaliaksandr ✅
3 changed files with 42 additions and 0 deletions
|
@ -60,6 +60,10 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
|||
if (name == HTML::AttributeNames::align) {
|
||||
if (value.equals_ignoring_ascii_case("center"sv) || value.equals_ignoring_ascii_case("middle"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebCenter));
|
||||
} else if (value.equals_ignoring_ascii_case("left"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebLeft));
|
||||
} else if (value.equals_ignoring_ascii_case("right"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebRight));
|
||||
} else {
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::TextAlign))
|
||||
style.set_property(CSS::PropertyID::TextAlign, parsed_value.release_nonnull());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue