How can I find out the unicode values of Ionicons 5?
In version 2 of the icons there was a cheat sheet which listed each icon together with its unicode value and HTML entity (see https://ionicons.com/v2/cheatsheet.html). But unfortunately, I cannot find something similar for the current version.
In my current case I need the unicode value of the play-circle icon to be used in a CSS content property. Does anyone know the code of this icon?
Best regards.
I believe that Ionicons 4+ are architected differently, so the notion of “unicode value” isn’t always meaningful, let alone something that should be relied upon. Can you not achieve what you want with other selectors?
What do you mean by “other selectors”?
What I want to achieve is to lay a play button over a video preview image via CSS. This works fine using this CSS code with specifying the unicode value of the icon for the content attribute:
.video-preview:after {
color: white;
content: "\f215";
font-family: Ionicons;
font-size: 75px;
opacity: 0.5;
position: absolute;
text-shadow: 0 3px black;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
z-index: 100;
}
The Unicode values from the V2 cheat cheet still work (as far as I have tested), but there are a lot more icons in newer versions. The example above shows the play button without the circle.
Can you do something using multiple elements and positioning? I don’t think modern versions of Ionicons necessarily even are web fonts - like Font Awesome, I think SVG is the preferred deployment.