Skip to content

Commit fb0887c

Browse files
committed
Fix crash when using currentColor in gradients
1 parent e7c452c commit fb0887c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

weasyprint/css/utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ def parse_radial_gradient_parameters(arguments):
360360
def parse_color_stop(tokens):
361361
if len(tokens) == 1:
362362
color = parse_color(tokens[0])
363+
if color == 'currentColor':
364+
# TODO: return the current color instead
365+
return parse_color('black'), None
363366
if color is not None:
364367
return color, None
365368
elif len(tokens) == 2:

0 commit comments

Comments
 (0)