CSS :not([class])

Use to select elements that don't have a class. Useful for default styling and not having to overwrite further down in css.

h1:not([class]) {
/* Default h1 styles */
}

p:not([class]) {
/* Default p styles without a class */
}

Let me know what you think on twitter @rdallaire

← Return to blog