summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibWeb/CSS/Length.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp
index ea9c5362e8..c8ada1dd86 100644
--- a/Userland/Libraries/LibWeb/CSS/Length.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Length.cpp
@@ -64,6 +64,8 @@ Length Length::resolved(Layout::Node const& layout_node) const
return m_calculated_style->resolve_length(layout_node).release_value();
if (is_relative())
return make_px(to_px(layout_node));
+ if (!isfinite(m_value))
+ return make_auto();
return *this;
}