Skip to content

Comment on Show HN: Generate avatars from user initialsparent

Comments

The reason its not CSS is because this api generates the initials for you.

It's been a while since I've written any CSS, but I'm pretty sure you can select first letters? Useful for drop caps, for example.

Absolutely, but it’s not that simpel, it’s made to be flexible and handle different logic. Not that it’s magic by any means, it’s fairly simple but you’d want to generate the initials on the server anyway, to acomplish similar results

For example, it takes first letter of first name, and 2 letters from last name if only two names supplied and desired length is 3.

However if 3 names are supplied, it uses a letter from each name.

It’s not magic, but doing it in CSS wouldn’t be easy, I imagine

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.