mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibWeb: Add support for parsing grid-auto-flow
CSS property
Co-Authored-By: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
This commit is contained in:
parent
1a5533e528
commit
703c2bb06e
13 changed files with 168 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* 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));
|
||||
}
|
||||
|
||||
ErrorOr<String> GridAutoFlowStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
if (m_row)
|
||||
builder.append("row"sv);
|
||||
else
|
||||
builder.append("column"sv);
|
||||
if (m_dense)
|
||||
builder.append(" dense"sv);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue