summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorEgor Ananyin <ananinegor@gmail.com>2021-04-22 11:04:46 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-22 19:17:10 +0200
commitc2280a907da94cdb49163f13b6ca3a415522e1f5 (patch)
tree78e20531d80c26d84180d786367b73cea86e3491 /Userland/Libraries
parent174c94047933cd11763231fd3250d04c5ca33340 (diff)
downloadserenity-c2280a907da94cdb49163f13b6ca3a415522e1f5.zip
LibWeb: Parse line-height inside font property
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleResolver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp b/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp
index f08b8d8235..7c9260ee39 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp
@@ -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)