From d24f2972d48105d597214b965fc247303088a0f5 Mon Sep 17 00:00:00 2001 From: Shubham Padia Date: Tue, 22 Jul 2025 14:49:23 +0000 Subject: [PATCH] icons: Do not allow fill property via the style tag in svgs. We already had a lint rule for this, but we did not disallow setting it from the style side. This was breaking the icons changed in this commit in our new astro help center. --- tools/linter_lib/custom_check.py | 5 +++++ web/shared/icons/alarm-clock.svg | 12 ++++++------ web/shared/icons/reset.svg | 2 +- web/shared/icons/triple-users.svg | 12 ++++++------ web/shared/icons/user.svg | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 29e00d4f99..ceaa0de961 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -980,6 +980,11 @@ svg_rules = RuleList( "description": "System icons ignore fill values, so do not include the fill property.", "include_only": {"web/shared/icons/", "web/images/icons/"}, }, + { + "pattern": "fill:", + "description": "System icons ignore fill values, so do not include the fill property.", + "include_only": {"web/shared/icons/", "web/images/icons/"}, + }, { "pattern": r"fill-rule=(['\"])(.*?)\1", "description": "System icons ignore fill-rule values, so do not include the fill-rule property.", diff --git a/web/shared/icons/alarm-clock.svg b/web/shared/icons/alarm-clock.svg index f1bd6d69b1..0a5a1734e3 100644 --- a/web/shared/icons/alarm-clock.svg +++ b/web/shared/icons/alarm-clock.svg @@ -7,27 +7,27 @@ diff --git a/web/shared/icons/reset.svg b/web/shared/icons/reset.svg index ff19f6742d..d620147b62 100644 --- a/web/shared/icons/reset.svg +++ b/web/shared/icons/reset.svg @@ -1,6 +1,6 @@ diff --git a/web/shared/icons/triple-users.svg b/web/shared/icons/triple-users.svg index d6087526c8..ba8c115edc 100644 --- a/web/shared/icons/triple-users.svg +++ b/web/shared/icons/triple-users.svg @@ -12,27 +12,27 @@ diff --git a/web/shared/icons/user.svg b/web/shared/icons/user.svg index b3ffe50ae2..ed0d87d97e 100644 --- a/web/shared/icons/user.svg +++ b/web/shared/icons/user.svg @@ -10,5 +10,5 @@ + style="fill-opacity:1;opacity:0.99999999" /> \ No newline at end of file