ladybird/Tests/LibWeb/Layout/input/table/th-default-text-align.html
Jelle Raaijmakers 9f7447f546 LibWeb: Prioritize inheriting text-align for <th>
Because we defined `th { text-align: center }` in our UA stylesheet, it
received a higher precedence than inherited (inline) styles. Firefox
deals with this by defining a custom `text-align` value that prioritizes
any inherited value before defaulting to `text-align: center`.

We now do this as well :^)
2025-07-15 10:05:48 +02:00

22 lines
747 B
HTML

<!DOCTYPE html>
<style>
.a tr {
text-align: left;
}
.b tr {
text-align: center;
}
.c tr {
text-align: right;
}
.d {
text-align: left;
}
</style>
<table><tr><th>default</th></tr><tr><th>lorem ipsum sit</th></table>
<table class="a"><tr><th>left tr</th></tr><tr><th>lorem ipsum sit</th></table>
<table class="b"><tr><th>center tr</th></tr><tr><th>lorem ipsum sit</th></table>
<table class="c"><tr><th>right tr</th></tr><tr><th>lorem ipsum sit</th></table>
<table class="d"><tr><th>left tbl</th></tr><tr><th>lorem ipsum sit</th></table>
<table><tr style="text-align: left"><th>left tr inl</th></tr><tr><th>lorem ipsum sit</th></table>
<table style="text-align: left"><tr><th>left tbl inl</th></tr><tr><th>lorem ipsum sit</th></table>