UI Deploy

Curated, Short, Web UI Dev we Love.

All about the :not() selector

As CSS grows and grows, more robust and useful selectors are adopted into the spec. Although I don’t know all them by heart, I regularly use (in production) widely known selectors that have been around for awhile. The best part about these types of selectors is that it saves you having to add additional classes to your markup. Where you used to have to add something like ‘.first’ or ‘.last’ classes to elements, you instead can style those elements using only CSS via the ‘:first-child’ and ‘:last-child’ element. Such cleaner, much semantics.

view source

Advertisement