From 15b7bdb3845244d303c263f377fd46d7ec1581ee Mon Sep 17 00:00:00 2001 From: Hidde Boomsma Date: Fri, 3 Nov 2023 06:36:05 +0100 Subject: [PATCH] Allow current color as valid css color In SVG images `curentColor` is allowed as a way to explicitly inherit the current color. When setting `currentColor` as fill color on a shape together with a styling class, the class will now be used instead of the theme, which was not possible otherwise. --- d2graph/color_helper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/d2graph/color_helper.go b/d2graph/color_helper.go index b72dec5436..4615847a4f 100644 --- a/d2graph/color_helper.go +++ b/d2graph/color_helper.go @@ -4,6 +4,7 @@ import "regexp" // namedColors is a list of valid CSS colors var namedColors = []string{ + "currentcolor", "transparent", "aliceblue", "antiquewhite",