-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Could icons source code be improved? #5600
Comments
Hi there @coremyslo! 👋 The SVGs available in the package are the raw SVG assets currently and are not optimized. The icons shipped in our packages are optimized, however. We do have a ticket open for optimizing the output of the SVGs available in this directory over in #5568 if you would like to follow along with that progress! |
Hi, thank you for the quick response. Issues reported above definitely related to that ticket and after some investigation, confirming they can be fixed using svgo. I will move any further communication to that ticket. |
@joshblack I missed that issue in (2) not relates to optimization Which causes an issue when creating iconfont using Affected icons: This can't be fixed using SVGO. |
Hi @coremyslo! What I meant by optimization is that these extra attributes (e.g. fill and stroke) are removed by SVGO when they are being optimized 👍 |
What package(s) are you using?
Summary
Hi, I'm interested to use icons package as a dependency in my open source project.
I was trying to build icon font based on SVG's, and faced several issues, listed below. Not sure if they can be reported as bugs, since not sure anyone else has the same.
Relevant information
<styles>
block can be replaced with relevant icon attributes?My Icon font generator build icon as
Instead of
Which is caused by using inline
<style>
tag with fill value.Syntax below would fix the issue:
NOTE: actually
<rect id="_Transparent_Rectangle_">
is not needed for production code.Example:
Icon
In some conditions can be rendered as
Which is cased by issue described in (1), also because svg has not used element
Icon "alarm"
In some conditions can be rendered as
Because of using "transform".
Could elements using transform be flatten?
The text was updated successfully, but these errors were encountered: