From 6ebb4f44ef66ecca599a9bf016bb4a5d23a847b2 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Thu, 22 Aug 2024 15:19:44 +0200 Subject: [PATCH] Apply stylesheet and other basic operations to SVG root tag Related to #1740 and #2234. --- weasyprint/svg/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/weasyprint/svg/__init__.py b/weasyprint/svg/__init__.py index e275d0acd..7847c19cd 100644 --- a/weasyprint/svg/__init__.py +++ b/weasyprint/svg/__init__.py @@ -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 = {} @@ -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()