1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:38:10 +00:00

LibWeb: Allow font-size: 0

Zero is a valid font-size value, and should result in no text being
visible. We now match the behavior of other engines.
This commit is contained in:
Andreas Kling 2023-09-05 12:04:00 +02:00
parent 6a32634440
commit e013306df8
3 changed files with 20 additions and 2 deletions

View file

@ -2223,8 +2223,7 @@ RefPtr<Gfx::Font const> StyleComputer::compute_font_for_style_values(DOM::Elemen
}
if (maybe_length.has_value()) {
auto px = maybe_length.value().to_px(length_resolution_context).to_int();
if (px != 0)
font_size_in_px = px;
font_size_in_px = px;
}
}