Dirk Bergmann

Developer, panographer. Does consultancy work from own company. Lives in Chiang Mai, Thailand.


Chiang Mai

Hua Hin

Thailand Hotels

ListVote - List. Vote. Learn.

Partnerseek - Find Partners

CSS Specificity Algorithm Table from Evan Sharp's Mix 2010 talk

Having watched Evan Sharp?s ?Comp to Code? talk at Mix 2010 video (check out the other Mix videos also, most are excellent), searching the web for the CSS specificity algorithm table turned up nothing as simple as his pseudo-decimal algorithm. So I reproduced the table from the talk verbatim here for reference. As you can see, id selector elements will dramatically increase the specificity of the selector, while class selector elements are an order of magitude less specific:

CSS specificity algorithm table

Sorry, the table didn't survive the conversion from Wordpress to Markdown/Clojure. You may want to watch the Mix Talk.

Exercise for the reader: Say "Specificity" three times fast. Extra points: Say "specificity algorithm" three times fast.