-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github action to ensure svg fulfills requirements regarding css classes/inline css #407
Comments
Hello, I agree. I think we can add an extra step or a parallel job in the peek script to ensure that all svgs follow our guideline. We should also check for the view box as well. We had an issue with the view box not being "0 0 128 128" before. |
|
I can run a small script to check that the current icons match our guidelines. During this time, I think we should refrain from merging new icons until: -The upload issue is fixed (seems like it is for now) |
Cool! :) @Thomas-Boi you're contributing so much useful additions! Feel free to correct the issues regarding the viewbox. We could add this script as github action to run on each
Mh, I think this is more related to "optimisation", same for removing SVG comments like in Those are superfluous and therefore can be removed. |
As proposed in #403 and #400 we would like to introduce a new requirement for adding SVG icons to this project:
SVGs are not allowed to have
classes
for defining properties but instead enforcing inline css to declare styling. This might not considered best practice in general but in this case it provides a cleaner look of your icons and solving decleration issues which can occur when classes are beeing used.Bad example (no longer allowed)
Improved example (what the rule should enforce)
Since this can be checked automated it would improve the reviewing process when this rule would be checked by a gihub action on every pull request.
The text was updated successfully, but these errors were encountered: