Closed jkphl closed 10 years ago
Starting with version v0.1.2 iconizr adds an additional CSS selector for the regular icon state (which doesn't have a pseudo class by design), so you can also use this icon variant without letting the other pseudo classes become effective:
icon-foo-bar, icon-foo-bar\:regular { ... }
icon-foo-bar:hover, icon-foo-bar\:hover { ... }
To apply these icon styles to HTML elements just use them like this:
<span class="icon-foo-bar:regular">Regular icon state</span>
<span class="icon-foo-bar:hover">Hover icon state</span>
It may seem weird to use colons als parts of CSS class names, but in fact it's perfectly legal – you just have to escape the colons in your CSS files using a backslash \
.
At the moment it is impossible to apply the regular state of an icon without implicitly applying it's hover state as well. The regular icon state should be available via a second, independent class name (which has no accompanying
:hover
pseudo class).