mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
This inheritance exists for typed-om classes, but StyleValues aren't
typed-om.
Somehow this makes our z-index interpolation slightly more correct. 🎉
25 lines
660 B
C++
25 lines
660 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
|
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
|
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
|
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "NumberStyleValue.h"
|
|
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
String NumberStyleValue::to_string(SerializationMode) const
|
|
{
|
|
return String::number(m_value);
|
|
}
|
|
|
|
Vector<Parser::ComponentValue> NumberStyleValue::tokenize() const
|
|
{
|
|
return { Parser::Token::create_number(Number { Number::Type::Number, m_value }) };
|
|
}
|
|
|
|
}
|