From 0487485fb16df2c7bc20f721411eb19dfde5dfcc Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sun, 3 Mar 2024 09:18:03 -0700 Subject: [PATCH] LibWeb: Limit length values to 5 decimal places when serializing --- Userland/Libraries/LibWeb/CSS/Length.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp index d4752a6ac3..7b2097885a 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.cpp +++ b/Userland/Libraries/LibWeb/CSS/Length.cpp @@ -184,7 +184,7 @@ String Length::to_string() const { if (is_auto()) return "auto"_string; - return MUST(String::formatted("{}{}", m_value, unit_name())); + return MUST(String::formatted("{:.5}{}", m_value, unit_name())); } char const* Length::unit_name() const