Declaration.h 737 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020-2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/String.h>
  8. #include <AK/Vector.h>
  9. #include <LibWeb/CSS/CSSStyleDeclaration.h>
  10. #include <LibWeb/CSS/Parser/ComponentValue.h>
  11. namespace Web::CSS::Parser {
  12. class Declaration {
  13. public:
  14. Declaration(FlyString name, Vector<ComponentValue> values, Important);
  15. ~Declaration();
  16. StringView name() const { return m_name; }
  17. Vector<ComponentValue> const& values() const { return m_values; }
  18. Important importance() const { return m_important; }
  19. String to_string() const;
  20. private:
  21. FlyString m_name;
  22. Vector<ComponentValue> m_values;
  23. Important m_important { Important::No };
  24. };
  25. }