mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Support "transparent" CSS color value
This commit is contained in:
parent
57857cd8f6
commit
cbd746e3ec
Notes:
sideshowbarker
2024-07-19 06:40:17 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/cbd746e3ecb Pull-request: https://github.com/SerenityOS/serenity/pull/2214 Reviewed-by: https://github.com/awesomekling
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…
Reference in a new issue