1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

LibWeb: Add helper function for creating auto GridTrackSizes

Makes it more convenient to create auto GridTrackSizes. I think having
an auto GridTrackSize be defined by an auto Length value kind of
confusing, and this at least helps when creating one.
This commit is contained in:
martinfalisse 2022-09-07 15:09:32 +02:00 committed by Andreas Kling
parent ad221164d5
commit 9681eb89a6
2 changed files with 7 additions and 0 deletions

View file

@ -30,6 +30,11 @@ GridTrackSize::GridTrackSize(float flexible_length)
{
}
GridTrackSize GridTrackSize::make_auto()
{
return GridTrackSize(CSS::Length::make_auto());
}
String GridTrackSize::to_string() const
{
switch (m_type) {