mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
LibWeb: Parse line-height inside font property
This commit is contained in:
parent
174c940479
commit
c2280a907d
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('/');
|
auto size_parts = parts[0].split_view('/');
|
||||||
if (size_parts.size() == 2) {
|
if (size_parts.size() == 2) {
|
||||||
auto size = parse_css_value(context, size_parts[0]);
|
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;
|
return;
|
||||||
style.set_property(CSS::PropertyID::FontSize, size.release_nonnull());
|
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) {
|
} else if (size_parts.size() == 1) {
|
||||||
auto size = parse_css_value(context, parts[0]);
|
auto size = parse_css_value(context, parts[0]);
|
||||||
if (!size)
|
if (!size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue