3 ms·
Here's some of the specificity code from Webkit (right at the top of the file): http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSSelector.cpp?rev=121
by nemetroid 14y ago
Here's some of the specificity code from Webkit (right at the top of the file):
http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSSelector.cpp?rev=121551 http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSS...
Basically, selectors are summed together with class selectors given a weight of 0x100, and id selectors given a weight of 0x10000, so this is a simple overflow. It's worth noting that a mask of 0xffffff is used, so using 256 #id's should give a specificity of zero.