mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibWeb: Make default text-decoration-thickness a fraction of font height
Previously the default was always 1px, which didn't look great on higher font sizes. This changes the default thickness to one-tenth to the font height. The one-tenth part was chosen arbitrarily, but I think it does the job pretty well. :^)
This commit is contained in:
parent
df9a833d7a
commit
119873b822
2 changed files with 2 additions and 2 deletions
|
@ -324,7 +324,7 @@ static void paint_text_decoration(Gfx::Painter& painter, Layout::Node const& tex
|
|||
int line_thickness = [&] {
|
||||
CSS::Length computed_thickness = text_node.computed_values().text_decoration_thickness().resolved(text_node, CSS::Length(1, CSS::Length::Type::Em));
|
||||
if (computed_thickness.is_auto())
|
||||
return CSS::InitialValues::text_decoration_thickness().to_px(text_node);
|
||||
return max(glyph_height * 0.1f, 1.f);
|
||||
|
||||
return computed_thickness.to_px(text_node);
|
||||
}();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue