diff --git a/Userland/Libraries/LibWeb/CSS/PercentageOr.h b/Userland/Libraries/LibWeb/CSS/PercentageOr.h index 77046ac22c6..a6cf565e560 100644 --- a/Userland/Libraries/LibWeb/CSS/PercentageOr.h +++ b/Userland/Libraries/LibWeb/CSS/PercentageOr.h @@ -97,6 +97,12 @@ public: CSSPixels to_px(Layout::Node const& layout_node, CSSPixels reference_value) const { + if constexpr (IsSame) { + if (auto const* length = m_value.template get_pointer()) { + if (length->is_absolute()) + return length->absolute_length_to_px(); + } + } return resolved(layout_node, reference_value).to_px(layout_node); }