mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 19:28:48 +00: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:
parent
d1678e03ff
commit
9f7447f546
Notes:
github-actions[bot]
2025-07-15 08:07:00 +00:00
Author: https://github.com/gmta
Commit: 9f7447f546
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5441
7 changed files with 259 additions and 3 deletions
|
@ -222,6 +222,7 @@ void LineBuilder::update_last_line()
|
|||
switch (text_align) {
|
||||
case CSS::TextAlign::Center:
|
||||
case CSS::TextAlign::LibwebCenter:
|
||||
case CSS::TextAlign::LibwebInheritOrCenter:
|
||||
inline_offset += excess_inline_space / 2;
|
||||
break;
|
||||
case CSS::TextAlign::Start:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue