You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
I love svgeez gem & this is my go-to tool for SVG icon system in all of my Rails projects. I would like to express my gratitude to the maintainers of this project. 👏👏👏
--destination app/assets/images/icon-sprite.svg option creates a svg sprite with each icon id prefixed with icon-sprite, inherited from the destination filename.
Each icon symbol <symbol></symbol> is represented by Svgeez::Elements::SymbolElement class
(svgeez/elements/symbol_element.rb). It's id attribute is evaluated in the following method
Acknowledgement
I love
svgeez
gem & this is my go-to tool forSVG
icon system in all of my Rails projects. I would like to express my gratitude to the maintainers of this project. 👏👏👏Current Behavior
Command:
svgeez build --source app/assets/images/icons/ --destination app/assets/images/icon-sprite.svg --with-svgo
Icon List
--destination app/assets/images/icon-sprite.svg
option creates asvg
sprite with each icon id prefixed withicon-sprite
, inherited from the destination filename.Sample Sprite
HOW??
Each icon symbol
<symbol></symbol>
is represented bySvgeez::Elements::SymbolElement
class(
svgeez/elements/symbol_element.rb
). It'sid
attribute is evaluated in the following methodEssentially icon id is set to
[@file_id]-[ICON_FILENAME]
. Now@file_id
is set to sprite filename (icon-sprite) bySvgeez::Elements::SvgElement
asIssue
As evident from the icon sprite sample, each icon id is prefixed with
icon-sprite
.Proposed Enhancement
--icon-prefix
--icon-prefix
to generate svg symbol ids instead of@file_id
.It would be great to have some community feedback on this. Meanwhile, I am trying to implement my proposal & will share shortly.
The text was updated successfully, but these errors were encountered: