Skip to content

Commit e5aa8a9

Browse files
Thomas-Boiamacado
andauthored
Check-svgs won't check for styles in SVGs (#807)
Co-authored-by: Clemens Bastian <8781699+amacado@users.noreply.github.com>
1 parent 3de92a7 commit e5aa8a9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

.github/scripts/check_svgs_on_pr.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,14 @@ def check_svgs(svg_file_paths: List[Path]):
6767
err_msg.append(f"-root is '{root.tag}'. Root must be an 'svg' element")
6868

6969
if root.get("viewBox") != "0 0 128 128":
70-
err_msg.append("-'viewBox' is not '0 0 128 128' -> Set it or scale the file using https://www.iloveimg.com/resize-image/resize-svg")
70+
err_msg.append("-'viewBox' is not '0 0 128 128' -> Set it or scale the file using https://www.iloveimg.com/resize-image/resize-svg.")
7171

7272
if root.get("x") is not None:
7373
err_msg.append("-unneccessary 'x' attribute in svg root element -> Remove it")
7474

7575
if root.get("y") is not None:
7676
err_msg.append("-unneccessary 'y' attribute in svg root element -> Remove it")
7777

78-
style = root.findtext(f".//{namespace}style")
79-
if style != None and "fill" in style:
80-
err_msg.append("-contains style declaration using 'fill' -> Replace classes with the 'fill' attribute instead")
81-
8278
if len(err_msg) > 1:
8379
err_msgs.append("\n".join(err_msg))
8480
except et.ParseError as e:

0 commit comments

Comments
 (0)