DEV Community


Discussion on: Why you should forget about !important?

afif profile image
Temani Afif

The specificity calculation doesn't really use points the way you described. Considering your logic, if we have 11 classes we will get 11*10=110 points and this will be bigger than the 100 points of the ID but still the ID will win.

This is a well known confusion in many articles (and a well known SO question around the subject:

Refer to the official specification for accurate detail about the calculation: you will see that we calculate 3 components and we do a comparaison one by one.

hugolyra profile image
Hugo Lyra Author • Edited

Thanks, update with what I learn from you ;)