phosphor-icons / homepage

The homepage of Phosphor Icons, a flexible icon family for everyone
https://phosphoricons.com
MIT License
4.21k stars 101 forks source link

X icon doesn't work as ligature #583

Closed rienheuver closed 1 day ago

rienheuver commented 2 days ago

Describe the bug

<i class="ph">x</i> doesn't show the cross icon because the ligature doesn't work. Not very strange, since it's a one-character description and therefore can't be a ligature. I suggest renaming it to something with at least two characters so this can be resolved, e.g. cross

Steps to Reproduce

Create a html-file, include phosphor icons in the <head> tag and use <i class="ph">x</i>

Expected behavior

The x icon should show

Additional notes

The workaround is to use <i class="ph">&#xE4f6;</i> instead, but that's not very user friendly and also not very clear from the documentation.

rektdeckard commented 1 day ago

You can just use the full class name:

<i class="ph ph-x"></i>

The ligature feature is a bonus, and we don't want to rename possibly the most-used icon in the library. In the future, if we have a complete alphabet, we might place the alphabetic icons in the ASCII range of the font, so they can be typed as normal without ligatures or hard-to-type unicodes.