design-system icon indicating copy to clipboard operation
design-system copied to clipboard

Publish Icon woff2

Open pbal opened this issue 3 years ago • 2 comments

IDS library should also publish icons in woff2 format. This allows

  • compression of icon library before it hits browser
  • consuming app to avoid injecting svg in html dom before using any icon.

With woff2 asset, app can link the asset and refer to the icon name via content attribute. If library can provide ready to use css classes with content already set that would be great.

pbal avatar Aug 19 '21 01:08 pbal

Not a bad idea if its possible, the icons are in Figma so would need to get them in this format, not reading their API can do this directly so maybe something like: https://github.com/jaywcjlove/svgtofont

tmcconechy avatar Aug 19 '21 13:08 tmcconechy

Another reason why icon font resource should be preferred over svg is

  • Base UI framework enterprise or enterprise-wc can avoid fetching icons metadata, preparing svg dom and then injecting SVGs into dom. This saves UI thread resources from processing above data.

pbal avatar Sep 09 '21 19:09 pbal