mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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:
parent
69d064697a
commit
7c2680b7ef
Notes:
github-actions[bot]
2024-10-16 06:35:06 +00:00
Author: https://github.com/AtkinsSJ
Commit: 7c2680b7ef
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1788
Reviewed-by: https://github.com/tcl3
3 changed files with 10 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -18,6 +18,9 @@ ValueComparingNonnullRefPtr<GridTemplateAreaStyleValue> GridTemplateAreaStyleVal
|
|||
|
||||
String GridTemplateAreaStyleValue::to_string() const
|
||||
{
|
||||
if (m_grid_template_area.is_empty())
|
||||
return "none"_string;
|
||||
|
||||
StringBuilder builder;
|
||||
for (size_t y = 0; y < m_grid_template_area.size(); ++y) {
|
||||
for (size_t x = 0; x < m_grid_template_area[y].size(); ++x) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue