2023-08-17 20:25:18 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
|
2023-08-17 20:25:18 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "GridAutoFlowStyleValue.h"
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
ValueComparingNonnullRefPtr<GridAutoFlowStyleValue> GridAutoFlowStyleValue::create(Axis axis, Dense dense)
|
|
|
|
{
|
|
|
|
return adopt_ref(*new GridAutoFlowStyleValue(axis, dense));
|
|
|
|
}
|
|
|
|
|
2023-08-22 14:08:15 +01:00
|
|
|
String GridAutoFlowStyleValue::to_string() const
|
2023-08-17 20:25:18 +02:00
|
|
|
{
|
|
|
|
StringBuilder builder;
|
|
|
|
if (m_row)
|
|
|
|
builder.append("row"sv);
|
|
|
|
else
|
|
|
|
builder.append("column"sv);
|
|
|
|
if (m_dense)
|
|
|
|
builder.append(" dense"sv);
|
2023-08-22 14:08:15 +01:00
|
|
|
return MUST(builder.to_string());
|
2023-08-17 20:25:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|