Ole
Ole

Reputation: 46960

List of all html entities as name value pairs

I'm attempting to create css icon utilities that utilize html entities as the icon content. Here's a set of examples in my github repository and here's one individual example:

.u-icon-olt {
    content: "⧀";
}


.u-icon-ogt {
    content: "⧁";
}

So far I have been adding each entity one by one as needed, but if I have a list of entities as key value pairs [olt: ⧀, ogt: ⧁, ...] then I can generate the above CSS. Anyone know if there exists such a list?

Upvotes: 0

Views: 118

Answers (1)

Kenan Banks
Kenan Banks

Reputation: 211990

If I had to do this, I'd parse the reference at w3c.

Here's what that page looks parsed into JSON.

And here's the code I used to parse it (in python).

Upvotes: 2

Related Questions