CSS Tip: Use :not to Save Time and Lines of Code - The Bold Report(theboldreport.net)

4 years ago from Tim Smith, Maker of stuff

  • Taurean BryantTaurean Bryant, 4 years ago

    This is really good when you want to create a class that overrides most specificity. I use it to apply a blanket screen-reader-only class.

    CSS still treats this as having an ID even though you're technically saying it doesn't have an ID, so it will override any class declaration regardless of its placement in your CSS document. The only thing that could override it would be another ID or an inline style.

    1 point