mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +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:
parent
581d00293c
commit
4e48afd9a7
Notes:
github-actions[bot]
2024-08-21 09:53:11 +00:00
Author: https://github.com/AtkinsSJ
Commit: 4e48afd9a7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1091
6 changed files with 20 additions and 21 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue