iamdtms, to CSS
@iamdtms@mas.to avatar

:not(AI) #CSS #selector

geoff, to random
@geoff@front-end.social avatar
chriskirknielsen,
@chriskirknielsen@front-end.social avatar

@geoff I use :not(#\#) as a specificity hack to avoid using !important, it's a little more aggressive but I try to be careful about using it.

Also, unless I'm misunderstanding you, :not() does not behave like :where(), and indeed does add specificity, by the way! a:not(b) has a score of 0,0,2, not 0,0,1: https://polypane.app/css-specificity-calculator/#selector=a%3Anot%28b%29

ppk, to CSS
@ppk@front-end.social avatar

Today I will write the first few #css #book pages of the #Selector part.

My request: please tell me about your cool, non-obvious selector tricks. I'd love to include a few in the book.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • khanakhh
  • mdbf
  • magazineikmin
  • modclub
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • Durango
  • tacticalgear
  • megavids
  • ngwrru68w68
  • everett
  • tester
  • cubers
  • normalnudes
  • thenastyranch
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • lostlight
  • All magazines