1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibWeb: Add Formatters for Length, Percentage and LengthPercentage

This commit is contained in:
Sam Atkins 2022-01-19 17:30:29 +00:00 committed by Andreas Kling
parent bfcbab0dcf
commit b34950a825
2 changed files with 24 additions and 0 deletions

View file

@ -147,3 +147,11 @@ private:
};
}
template<>
struct AK::Formatter<Web::CSS::Length> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Length const& length)
{
return Formatter<StringView>::format(builder, length.to_string());
}
};