Documenting some of my latest finds in CSS.

Icon fonts and [] attribute selector
Used icomoon.io today to create fonts from svg files. It was really easy to implement too! 2 CSS rules: one @font-face to embed and one [data-icon]:before to place content. Note the way to select by attribute. This is ie8+ compatible!

attr() value
Did you know you can set the property in CSS to an attribute’s value? That one blew mind! So, you can do something like, :before{ content: attr(data-icon); }. Paired with an icon font, you can get some crazy cool values! ie8+
http://davidwalsh.name/css-content-attr

Counters
You can display and increment numbers next to anything using css counters. Why would this be good?  Well imagine you need to have incrementing numbers across multiple types of elements and you’d rather not use an ol… Say rows in a table. Well now you can. Plus ie8+ compatible!
http://davidwalsh.name/css-counters

Leave a Reply

Your email address will not be published. Required fields are marked *