Skip to content

Commit

Permalink
Apply stylesheet and other basic operations to SVG root tag
Browse files Browse the repository at this point in the history
Related to #1740 and #2234.
  • Loading branch information
liZe committed Aug 22, 2024
1 parent ccf770d commit 6ebb4f4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions weasyprint/svg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,6 @@ def __init__(self, tree, url):
style = parse_stylesheets(wrapper, url)
self.tree = Node(wrapper, style)
self.url = url

# Replace 'currentColor' value
for key in COLOR_ATTRIBUTES:
if self.tree.get(key) == 'currentColor':
self.tree.attrib[key] = self.tree.get('color', 'black')

self.filters = {}
self.gradients = {}
self.images = {}
Expand All @@ -335,6 +329,7 @@ def __init__(self, tree, url):
self.cursor_d_position = [0, 0]
self.text_path_width = 0

self.tree.cascade(self.tree)
self.parse_defs(self.tree)
self.inherit_defs()

Expand Down

0 comments on commit 6ebb4f4

Please sign in to comment.