Invisible Pink Unicorns - a Firefox emoji rendering bug
Here's a curious bug I just discovered in Firefox 67 for Linux. Can you see this unicorn:
→🦄 ←
What happens if you use CSS to change the opacity of an emoji?
Here's a unicorn, with a pink font colour:
🦄 Unicorn
Let's wrap that in this scrap of CSS to make it 50% opaque.
color: rgba(255, 105, 180, 0.5);
🦄 Unicorn
Hopefully, you see a semi-transparent philosophical argument. What if we set the opacity to 0.0
- that is, completely transparent?
🦄 Unicorn
There's a shunicorn there. If you don't believe me, try highlighting it!
Now, let's try a see-though beastie, but this time adding a drop-shadow:
color: rgba(255, 105, 180, 0.5); text-shadow: .2em .2em .2em #000;
🦄 Unicorn
Good! And now fully transparent text plus a drop-shadow:
color: rgba(255, 105, 180, 0); text-shadow: .2em .2em .2em #000;
🦄 Unicorn
On Firefox, the text is invisible, but the emoji is completely visible - like this...

This bug is not present on Firefox for Android, nor Chromium for Linux.
The only way on Firefox, to get a completely invisible pink unicorn plus a drop shadow is to use:
color: rgba(255, 105, 180, 0.002); text-shadow: .2em .2em .2em #000;
🦄 Unicorn
color: rgba(255, 105, 180, 0.001); text-shadow: .2em .2em .2em #000;
🦄 Unicorn
0.002
is invisible, but 0.001
is visible.
I've raised this as a bug on Mozilla's Bugzilla.
In the meantime, if you can see the invisible pink unicorn, please let me know. Or contact a theologian.
mike says:
_benk says: