mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Store ShadowStyleValue's color as a StyleValue
Colors can be specified in a way that `Gfx::Color` can't represent, such as named system colors, `currentColor`, or functions involving `calc()`.
This commit is contained in:
@@ -15,8 +15,7 @@ namespace Web::CSS {
|
||||
String ShadowStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
serialize_a_srgb_value(builder, m_properties.color);
|
||||
builder.appendff(" {} {} {} {}", m_properties.offset_x->to_string(), m_properties.offset_y->to_string(), m_properties.blur_radius->to_string(), m_properties.spread_distance->to_string());
|
||||
builder.appendff("{} {} {} {} {}", m_properties.color->to_string(), m_properties.offset_x->to_string(), m_properties.offset_y->to_string(), m_properties.blur_radius->to_string(), m_properties.spread_distance->to_string());
|
||||
if (m_properties.placement == ShadowPlacement::Inner)
|
||||
builder.append(" inset"sv);
|
||||
return MUST(builder.to_string());
|
||||
|
||||
Reference in New Issue
Block a user