Vscode: [scss] Incorrect selector specificity in hover tooltip

Created on 19 Apr 2019  ·  3Comments  ·  Source: microsoft/vscode


  • VSCode Version: 1.33.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Type the code like
    image
  2. Move the mouse over &__b

image

The selector specificity is displayed as (0, 0, 0) instead of the correct (0, 1, 0), it being a class selector.


Does this issue occur when all extensions are disabled?: Yes/No
Yes.

bug css-less-scss

Most helpful comment

I still see the issue. The selector specificity is displayed as (0, 0, 0).

All 3 comments

I've encountered this also with vanilla CSS (Ctrl+K, M, "css"):

image

... whereas it should be (0, 0, 3), according to the "Selector Specificity" link provided in the tooltip.


Notice how :before was prefixed with a single colon. If I prefix it with double colon instead, like in ::before, I get correct results:

image

@aeschli @octref Would you mind if somebody checks this, and closes the issue in case it is fixed? Appreciate this!

I still see the issue. The selector specificity is displayed as (0, 0, 0).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trstringer picture trstringer  ·  3Comments

shanalikhan picture shanalikhan  ·  3Comments

philipgiuliani picture philipgiuliani  ·  3Comments

borekb picture borekb  ·  3Comments

mrkiley picture mrkiley  ·  3Comments