mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Allow fractional font sizes in CSS
Fixes an issue where relative font sizes would "snap" to integer sizes in an unpleasant-looking way while resizing on some websites.
This commit is contained in:
parent
4d71f4edc4
commit
23569f8690
3 changed files with 44 additions and 2 deletions
|
@ -2051,8 +2051,7 @@ RefPtr<Gfx::Font const> StyleComputer::compute_font_for_style_values(DOM::Elemen
|
|||
maybe_length = font_size.as_calculated().resolve_length(length_resolution_context);
|
||||
}
|
||||
if (maybe_length.has_value()) {
|
||||
auto px = maybe_length.value().to_px(length_resolution_context).to_int();
|
||||
font_size_in_px = px;
|
||||
font_size_in_px = maybe_length.value().to_px(length_resolution_context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue