Unicode CSS Classes
CSS class name structure and consistency is really important; some developers camelcase classnames, others use dashes, and others use underscores. One thing I've learned when toying around by HTML and CSS class names is that you can actually use unicode symbols and icons as classnames. Check this out!
The HTML and CSS
There's only one way to add a classname with HTML so you'll do it that way, of course:
<!-- place this within the document head -->
<meta charset="UTF-8" />
<!-- error message -->
<div class="ಠ_ಠ">You do not have access to this page.</div>
<!-- success message -->
<div class="❤">Your changes have been saved successfully!</div>
...and there's only one way to declare styles for a given class:
border: 1px solid #f00;
border: 1px solid green;
Wild that you can use unicode classnames for elements, right? Of course I don't recommend doing so, but you can if you'd like to!
Santa Clara, CA · May 27-29th
Get 20% off with
new Element Madness
The first way to create UI-driven...
Usability is a key feature when creating user interfaces; it's all in the details. I was recently using my iPhone and it dawned on my how awesome the "x" icon is in its input elements. No holding the delete key down. No pressing it a...