LibWeb/CSS: Serialize empty grid-template-* values correctly

Previously we would serialize these as the empty string. eg, this:

```
<div style="grid-auto-columns: auto"></div>
```

would have a computed `grid-auto-columns` value of ``.
This commit is contained in:
Sam Atkins 2024-10-14 14:32:27 +01:00 committed by Andreas Kling
commit 7c2680b7ef
Notes: github-actions[bot] 2024-10-16 06:35:06 +00:00
3 changed files with 10 additions and 4 deletions

View file

@ -244,6 +244,9 @@ GridTrackSizeList GridTrackSizeList::make_none()
String GridTrackSizeList::to_string() const
{
if (m_list.is_empty())
return "auto"_string;
StringBuilder builder;
for (auto const& line_definition_or_name : m_list) {
if (!builder.is_empty())