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:
parent
58a44036a9
commit
6b2ce2ccc3
2 changed files with 6 additions and 0 deletions
|
@ -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) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue