Declaration.h 707 B

1234567891011121314151617181920212223242526272829303132333435
  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 {
  12. class Declaration {
  13. friend class Parser::Parser;
  14. public:
  15. Declaration();
  16. ~Declaration();
  17. String 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. String m_name;
  23. Vector<ComponentValue> m_values;
  24. Important m_important { Important::No };
  25. };
  26. }