2023-03-24 16:45:58 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/CSS/StyleValue.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
|
|
class InheritStyleValue final : public StyleValueWithDefaultOperators<InheritStyleValue> {
|
|
|
|
|
public:
|
2023-05-05 15:02:03 +01:00
|
|
|
static ErrorOr<ValueComparingNonnullRefPtr<InheritStyleValue>> the()
|
2023-03-24 16:45:58 +00:00
|
|
|
{
|
2023-05-05 15:02:03 +01:00
|
|
|
static ValueComparingNonnullRefPtr<InheritStyleValue> instance = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) InheritStyleValue));
|
2023-03-24 16:45:58 +00:00
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
virtual ~InheritStyleValue() override = default;
|
|
|
|
|
|
|
|
|
|
ErrorOr<String> to_string() const override { return "inherit"_string; }
|
|
|
|
|
|
|
|
|
|
bool properties_equal(InheritStyleValue const&) const { return true; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
InheritStyleValue()
|
|
|
|
|
: StyleValueWithDefaultOperators(Type::Inherit)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|