StyleFunctionRule.h 821 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2020-2021, the SerenityOS developers.
  3. * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/RefCounted.h>
  9. #include <AK/String.h>
  10. #include <AK/Vector.h>
  11. #include <LibWeb/CSS/Parser/ComponentValue.h>
  12. #include <LibWeb/Forward.h>
  13. namespace Web::CSS {
  14. class StyleFunctionRule : public RefCounted<StyleFunctionRule> {
  15. friend class Parser::Parser;
  16. public:
  17. explicit StyleFunctionRule(String name);
  18. StyleFunctionRule(String name, Vector<ComponentValue>&& values);
  19. ~StyleFunctionRule();
  20. String const& name() const { return m_name; }
  21. Vector<ComponentValue> const& values() const { return m_values; }
  22. String to_string() const;
  23. private:
  24. String m_name;
  25. Vector<ComponentValue> m_values;
  26. };
  27. }