Declaration.h 811 B

12345678910111213141516171819202122232425262728293031323334
  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. #pragma once
  8. #include <AK/FlyString.h>
  9. #include <AK/Vector.h>
  10. #include <LibWeb/CSS/CSSStyleDeclaration.h>
  11. #include <LibWeb/CSS/Parser/ComponentValue.h>
  12. namespace Web::CSS::Parser {
  13. class Declaration {
  14. public:
  15. Declaration(FlyString name, Vector<ComponentValue> values, Important);
  16. ~Declaration();
  17. FlyString const& name() const { return m_name; }
  18. Vector<ComponentValue> const& values() const { return m_values; }
  19. Important importance() const { return m_important; }
  20. String to_string() const;
  21. private:
  22. FlyString m_name;
  23. Vector<ComponentValue> m_values;
  24. Important m_important { Important::No };
  25. };
  26. }