1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

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

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