alex-oleshkevich / vue-tabler-icons

Fully customizable free SVG icons made as Vue components.
MIT License
150 stars 13 forks source link

Remove class="icon" from output SVG #25

Closed ingalls closed 1 year ago

ingalls commented 1 year ago

Context

The icon class is used by several CSS frameworks for this own custom icons. Unfortunately this results in a poor display of tabler icons when used in conjunction.

This PR automatically parses and removes the icon class from output SVGs to avoid this clash.

I don't expect this to be merged (though it would be awesome -- although breaking -- if it was)

cc/ @alex-oleshkevich - Also really appreciate the work that went into this library. Really neat!

alex-oleshkevich commented 1 year ago

Fixed in master, thanks

esl51 commented 1 year ago

The .icon class is used by default in the Tabler admin panel, from which these icons were later separated. And .icon can be found in many places in the css file. Now, to use these components, you have to add class="icon" to each. This is not very convenient. It seems to me that tabler icons should match the tabler framework in the first place. Perhaps we need some parameter when registering the plugin to set the name of the class for all the icons.

alex-oleshkevich commented 1 year ago

I see. The optional parameter should be ok. .icon is very generic and causes troubles in any other project that reserves .icon for their needs.