mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
icons: Let the system using the icons specify the fill color.
The fill color is ignored when we generate webfonts in our main app. For our help center beta project using Astro, we would have needed to come up with a way to change fill colors for all the icons. Since, there was no reason for us to keep the fill colors in the SVGs, we decided to remove it instead and add a lint rule to keep that in check. See https://chat.zulip.org/#narrow/channel/6-frontend/topic/fill.20in.20our.20current.20svg.20icons for more details.
This commit is contained in:
committed by
Tim Abbott
parent
1db859db4a
commit
259ef423ad
@@ -966,6 +966,18 @@ txt_rules = RuleList(
|
||||
langs=["txt", "text", "yaml", "yml"],
|
||||
rules=whitespace_rules,
|
||||
)
|
||||
|
||||
svg_rules = RuleList(
|
||||
langs=["svg"],
|
||||
rules=[
|
||||
{
|
||||
"pattern": r"fill=(['\"])(.*?)\1",
|
||||
"description": "System icons ignore fill values, so do not include the fill property.",
|
||||
"include_only": {"web/shared/icons/", "web/images/icons/"},
|
||||
},
|
||||
],
|
||||
)
|
||||
|
||||
non_py_rules = [
|
||||
handlebars_rules,
|
||||
jinja2_rules,
|
||||
@@ -978,4 +990,5 @@ non_py_rules = [
|
||||
txt_rules,
|
||||
puppet_rules,
|
||||
openapi_rules,
|
||||
svg_rules,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user