Serenity Operating System
at master 34 lines 814 B view raw
1/* 2 * Copyright (c) 2020-2021, the SerenityOS developers. 3 * Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org> 4 * 5 * SPDX-License-Identifier: BSD-2-Clause 6 */ 7 8#pragma once 9 10#include <AK/FlyString.h> 11#include <AK/Vector.h> 12#include <LibWeb/CSS/CSSStyleDeclaration.h> 13#include <LibWeb/CSS/Parser/ComponentValue.h> 14 15namespace Web::CSS::Parser { 16 17class Declaration { 18public: 19 Declaration(FlyString name, Vector<ComponentValue> values, Important); 20 ~Declaration(); 21 22 StringView name() const { return m_name; } 23 Vector<ComponentValue> const& values() const { return m_values; } 24 Important importance() const { return m_important; } 25 26 ErrorOr<String> to_string() const; 27 28private: 29 FlyString m_name; 30 Vector<ComponentValue> m_values; 31 Important m_important { Important::No }; 32}; 33 34}