DEV Community

Discussion on: Share your CSS knowledge

Collapse
 
kylefilegriffin profile image
Kyle Griffin

:not can be stacked, to allow for multiple classes to be excluded:

.grid:not(.blue):not(.red) { }

This is because .grid:not(.blue), .grid:not(.red) will include both supposedly excluded classes as one includes the other.