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.
This commit is contained in:
Shubham Padia
2025-07-22 14:49:23 +00:00
committed by Tim Abbott
parent 81464c2812
commit d24f2972d4
5 changed files with 19 additions and 14 deletions

View File

@@ -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.",