1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

LibWeb: Deduplicate "ident is color" check

Reuse the check from IdentifierStyleValue in the CSS Parser, instead of
duplicating it. This might not be the ideal place to put it, but it
works for now.
This commit is contained in:
Sam Atkins 2023-08-23 15:40:17 +01:00 committed by Sam Atkins
parent da8692572a
commit 1dcd63be05
3 changed files with 11 additions and 65 deletions

View file

@ -24,6 +24,7 @@ public:
ValueID id() const { return m_id; }
static bool is_color(ValueID);
virtual bool has_color() const override;
virtual Color to_color(Optional<Layout::NodeWithStyle const&> node) const override;
virtual String to_string() const override;