Skip to content

Commit

Permalink
Fix crash when using currentColor in gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Sep 10, 2019
1 parent e7c452c commit fb0887c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions weasyprint/css/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ def parse_radial_gradient_parameters(arguments):
def parse_color_stop(tokens):
if len(tokens) == 1:
color = parse_color(tokens[0])
if color == 'currentColor':
# TODO: return the current color instead
return parse_color('black'), None
if color is not None:
return color, None
elif len(tokens) == 2:
Expand Down

0 comments on commit fb0887c

Please sign in to comment.