mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 14:04:59 +00:00
LibWeb: Support "transparent" CSS color value
This commit is contained in:
parent
57857cd8f6
commit
cbd746e3ec
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue