LoginSignup
0
1

More than 5 years have passed since last update.

scss-lintに"Avoid qualifying attribute selectors with an element"と言われたとき

Posted at

解決法が日本語で落ちていなかったので、とても単純な問題だったのに少しばかり引っかかってしまった

input[type=radio]:checked {
  +label {
    background-color: orange;
    color: #fff;
  }
}

このように書いたら怒られた

input {
  &[type=radio]:checked {
    +label {
      background-color: orange;
      color: #fff;
    }
  }
}

これで解決できる。
言われてみれば確かにそうですよね。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1