iamdtms, 7 days ago to CSS :not(AI) #CSS #selector
:not(AI) #CSS #selector
geoff, 1 month ago to random The New !important https://geoffgraham.me/the-new-css-important/
The New !important https://geoffgraham.me/the-new-css-important/
chriskirknielsen, 1 month ago @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
@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.
:not(#\#)
!important
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
:not()
:where()
ppk, 11 months ago to CSS 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.
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.