I’m trying to add Phosphor Icons to WeWeb. (Phosphor’s site and Github)
What I’ve tried so far
-
I used Statechange’s WeWeb Embed Converter to create javascript from Phosphor Icons’ script source and embedded that code into a before-app-load workflow.
-
I added an HTML embed for an icon and set its height and width to 50px.
-
I got the icon to show up by specifying the type of icon (e.g. thin, duotone, fill). Then you can add other properties like size as long as you do it with inline styling.
(4.) I tried uploading Phosphor icons files via the project’s Setting → Custom Fonts, but it broke something so now no fonts show up, not even the ones that were there earlier. [WeWeb currently has a support ticket open for this. I’ll update this post when addressed.]
Note
The downside of using icons this way rather than uploading the entire icon library seems to be that they can’t inherit the states of parent elements - e.g. icon is in a button and should change color on button:hover. Depending on use cases, that’s a big downside.
Ultimate Goal
Use all of the Phosphor icons with the ability to set properties based on a parent’s state.