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

LibWeb: Add CSS::Size::make_px(float) convenience helper

This commit is contained in:
Andreas Kling 2022-09-25 19:09:08 +02:00
parent 58a44036a9
commit 6b2ce2ccc3
2 changed files with 6 additions and 0 deletions

View file

@ -26,6 +26,11 @@ Size Size::make_auto()
return Size { Type::Auto, Length::make_auto() };
}
Size Size::make_px(float px)
{
return make_length(CSS::Length::make_px(px));
}
Size Size::make_length(Length length)
{
return Size { Type::Length, move(length) };