mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Parse scroll() for the animation-timeline CSS property
This commit is contained in:
Notes:
github-actions[bot]
2025-11-28 13:25:32 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7d70714eac3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6912 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "ScrollFunctionStyleValue.h"
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
String ScrollFunctionStyleValue::to_string(SerializationMode) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("scroll("sv);
|
||||
|
||||
if (m_scroller != Scroller::Nearest)
|
||||
builder.append(CSS::to_string(m_scroller));
|
||||
|
||||
if (m_axis != Axis::Block) {
|
||||
if (m_scroller != Scroller::Nearest)
|
||||
builder.append(' ');
|
||||
builder.append(CSS::to_string(m_axis));
|
||||
}
|
||||
|
||||
builder.append(')');
|
||||
return builder.to_string_without_validation();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user