1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibWeb: Make ColorStyleValue serialization spec compliant

[CSS Color 4] tells us to use either rgb() or rgba() notation, depending
on the color's alpha value.
This commit is contained in:
Andreas Kling 2021-10-03 17:56:01 +02:00
parent 0d73487204
commit 956968d4b2
2 changed files with 10 additions and 1 deletions

View file

@ -683,7 +683,7 @@ public:
virtual ~ColorStyleValue() override { }
Color color() const { return m_color; }
virtual String to_string() const override { return m_color.to_string(); }
virtual String to_string() const override;
virtual bool has_color() const override { return true; }
virtual Color to_color(Layout::NodeWithStyle const&) const override { return m_color; }