Open
Description
openedon Jan 14, 2022
Problem
The SVGs in the project are inconsistent and sometimes unformatted.
Description
Since the project contains a lot of SVG icons it might be a good idea to enforce
- fixed
viewBox
values - list of mandatory attributes (like
height
,width
and SVGxmlns
) - fixed valid group IDs (such as
icon
) - fixed rules for
fill
(such as fill being set only on the top-levelg
and havingcurrentColor
as the only value)
https://www.npmjs.com/package/svglint and https://github.com/svg/svgo are two tools that could be used for achieving consistency and optimisation in our SVGs.
Additional context
Simple Icons have a very comprehensive SVG linting solution for inspiration.
Configuration file is here:
https://github.com/simple-icons/simple-icons/blob/develop/svglint.config.mjs
Implementation
- 🙋 I would be interested in implementing this feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog