mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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 :^)
This commit is contained in:
committed by
Andreas Kling
parent
d1678e03ff
commit
9f7447f546
Notes:
github-actions[bot]
2025-07-15 08:07:00 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/9f7447f5461 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5441
22
Tests/LibWeb/Layout/input/table/th-default-text-align.html
Normal file
22
Tests/LibWeb/Layout/input/table/th-default-text-align.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user