mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Support "transparent" CSS color value
This commit is contained in:
committed by
Andreas Kling
parent
57857cd8f6
commit
cbd746e3ec
@@ -43,6 +43,9 @@ namespace Web {
|
||||
|
||||
static Optional<Color> parse_css_color(const StringView& view)
|
||||
{
|
||||
if (view.equals_ignoring_case("transparent"))
|
||||
return Color::from_rgba(0x00000000);
|
||||
|
||||
auto color = Color::from_string(view.to_string().to_lowercase());
|
||||
if (color.has_value())
|
||||
return color;
|
||||
|
||||
Reference in New Issue
Block a user