1

This small SCSS block

a {
  color: red;
  &:hover {
    color: green;
  }
}

i {
  a {
    text-decoration: none;
  }  
}

Gives this error

Expected selector "i a" to come before selector "a:hover" no-descending-specificity

But if I reverse the order

i {
  a {
    text-decoration: none;
  }  
}

a {
  color: red;
  &:hover {
    color: green;
  }
}

The error just reverses too

Expected selector "a" to come before selector "i a" no-descending-specificity

  • 1
    Linters are arbitrary, in all honesty, and don't really tell you anything about how the code works. In the second case it just complains because `i a` is more specific than `a`, in the first that `i a` is less specific than `a:hover` (is it? havent' checked but its so arbitrary)... – somethinghere Sep 15 '22 at 07:13

0 Answers0