LibWeb: Limit length values to 5 decimal places when serializing

This commit is contained in:
Matthew Olsson 2024-03-03 09:18:03 -07:00 committed by Alexander Kalenik
parent 7dcf060927
commit 0487485fb1
Notes: sideshowbarker 2024-07-17 04:34:25 +09:00

View File

@ -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