Close #1455 - Ember.js compatibility

This replaces all first-child, last-child, and nth-child selectors with first-of-type, last-of-type, and nth-of-type selectors to avoid bugs with handlebars and ember.js