mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibWeb: Parse line-height inside font property
This commit is contained in:
parent
174c940479
commit
c2280a907d
Notes:
sideshowbarker
2024-07-18 19:14:32 +09:00
Author: https://github.com/Cleverking2003
Commit: c2280a907d
Pull-request: https://github.com/SerenityOS/serenity/pull/6550
Issue: https://github.com/SerenityOS/serenity/issues/6408
Reviewed-by: https://github.com/awesomekling
1 changed files with 3 additions and 1 deletions
|
@ -652,9 +652,11 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
auto size_parts = parts[0].split_view('/');
|
||||
if (size_parts.size() == 2) {
|
||||
auto size = parse_css_value(context, size_parts[0]);
|
||||
if (!size)
|
||||
auto line_height = parse_css_value(context, size_parts[1]);
|
||||
if (!size || !line_height)
|
||||
return;
|
||||
style.set_property(CSS::PropertyID::FontSize, size.release_nonnull());
|
||||
style.set_property(CSS::PropertyID::LineHeight, line_height.release_nonnull());
|
||||
} else if (size_parts.size() == 1) {
|
||||
auto size = parse_css_value(context, parts[0]);
|
||||
if (!size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue