Open marcoscv-work opened 2 years ago
I know it could cause a strong breaking change and a renaming along all tools are currently using clay icons.. but I think we can automate them and I really think this is the perfect timing, before an LXC massive use.
@marcoscv-work I believe our icons are already namespaced. All those icons are prepended with lexicon-icon-
. We can add documentation on it?
I think the names are just the same to define the symbol id and can use in ClayIcon
, but other than that I also don't see any problem that can cause problem with icons of another spritemap.
I think this only would clash on directly icon calls or calls to the SVG sprite icon like "icons.svg#add-column":
<svg>
...
<use xlink:href="path/to/icons.svg#add-column" />
</svg>
https://clayui.com/docs/components/icon/markup.html#usage
We also use names in recommendations for bg: https://clayui.com/docs/components/icon/markup.html#svg-icons-as-background-images
Supposedly we can replace these icons and add more and we can't do that "easily" if the names match, the CSS classes are totally Ok.
Customer usually made directly calls to the icons in fragments but anyway, just warning, we can wait and see if in a real cases it can be an issue for customers or not.
Rename icons in order to avoid a possible frameworks crash
Since LXC is giving us the very strongly option to mix clay with another frameworks like Bootstrap 5 I think icons can crash very easily, here an a comparison between clay and BS5 by icon name:
https://docs.google.com/spreadsheets/d/1tSEKrDTjXeWAyFNwyJk5WV0ghG3xakHDKQOQQ6lE-fE/edit?usp=sharing
We have 71 coincidences so my suggestion is to change the icon names to make them uniques, for example by adding a prefix
c-
block
c-block
blogs
c-blogs
bold
c-bold
bolt
c-bolt
book
c-book