Skip to content
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

Update Icons to Use SVGs #262

Open
superstructor opened this issue Mar 8, 2021 · 0 comments
Open

Update Icons to Use SVGs #262

superstructor opened this issue Mar 8, 2021 · 0 comments

Comments

@superstructor
Copy link
Contributor

superstructor commented Mar 8, 2021

1. Status Quo

Uses Material Design Iconic Font. Implemented as font and CSS files distributed manually that must be made available via HTTP. A [:span] contains a special character code that maps to an icon in the font.

Upsides

  • No breaking changes.
  • No work to complete.
  • Supports old browsers (e.g. Internet Explorer, Android prior to 4.4 etc) although we probably don't care anymore.

Downsides

  • Must be manually deployed as a separate file. Not pulled in automatically with the JAR dependency and :require. Esp bad for upgrade experience or new users expecting the library to "just work".
  • Limited styling compared to SVG, in theory.
  • Limited to icons supported by the Iconic font distribution.
  • At some point upstream will probably stop shipping font files for icon sets, as it is effectively an obsolete technique now with widespread SVG support in browsers.

2. Material Design SVG Icons - Manual

Would use Material Icons as SVG represented as hiccup in reagent view functions.

Upsides

  • Pulled in automatically with JAR dependency and :require. No extra files to deploy.
  • Full CSS styling available, but would we actually use it ?
  • Opens up possibilities of animations and transitions.
  • Can include any SVG, not limited to a pre-packaged font.
  • Supports any relevant browser today (i.e. MS Edge, Chrome, Firefox, Safari etc)

Downsides

  • As the library maintainer, to upgrade or add icons from the upstream SVG icon set would be a manual process.
  • Tree shaking would not be possible or a breaking API change would be required.

3. Material Design SVG Icons - Automated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant