2

My Visual Studio keeps displaying the following warning (I think it's actually the Web Essentials plugin that produces it) but I'm not really clear why this is a problem? Can some explain please?

enter image description here

PS, Yes I understand what specificity is and how to calculate it, I just don't know why a specificity of 0,2,0 is a problem?

Community
  • 1
  • 1
Liam
  • 27,717
  • 28
  • 128
  • 190
  • 2
    The above isn't the error message, it's standard hovering info when you move your mouse over a selector with WE. However, the problem you're facing is probably the same selector being specified twice in the same file. – Etheryte Apr 14 '15 at 09:17
  • Ah, that's stupid. I didn't notice that. I would of expected the popup to relate to the underscoring, thanks @Nit – Liam Apr 14 '15 at 09:32
  • 1
    Also, your correct, there was another rule with the same selector in the file so that was producing the underscoring.. – Liam Apr 14 '15 at 09:36

2 Answers2

3

The above isn't the error message, it's standard hovering info when you move your mouse over a selector with WE. However, the problem you're facing is probably the same selector being specified twice in the same file.

Etheryte
  • 24,589
  • 11
  • 71
  • 116
-1

Pekka's answer is practically correct, and probably the best way to think about the issue.

The starting point is 4 figures:

style  id   class element
0,     0,   0,    0

So in your case you have used 2 class names so its showing as 2 in the middle.

Community
  • 1
  • 1
Nitesh Phadatare
  • 315
  • 1
  • 2
  • 12