specificity icon indicating copy to clipboard operation
specificity copied to clipboard

Change the specificity to "a, b, c" three-segment representation

Open yisibl opened this issue 3 years ago • 1 comments

specificityArray: the result as an array of numbers e.g. [0, 1, 0, 0]

Selectors Level 3 only has a,b,c

Safari's developer tools also only show a,b,c.

image

and 'css-specificity-calculator' site: https://polypane.app/css-specificity-calculator/#selector=.foo%3Ahover%20%3E%20h1

yisibl avatar May 10 '21 04:05 yisibl

@yisibl Polypane actually uses specificity! The first 0 is there to represent inline styles, which trump all. Since they are not applicable when dealing with CSS selectors directly, we hide them for clarity.

Kilian avatar Jun 15 '21 20:06 Kilian