将样式应用于悬停子项上的父项并且如果启用了父项

Apply to style to parent on hover child and if parent is enabled

我有这部分 html 代码:

<label> <input type="checkbox" name="filter[theme_tag_ids_mi][60]" value="Développement culturel">
                                                                    Développement culturel (16)</label>

少这种风格:

 input[type=checkbox]:enabled {
      cursor: pointer;
      & {
          color: #007884;
          cursor: pointer;
      }
  }

这个想法是在用户将鼠标悬停在标签(子)上时在启用的输入(父)上应用颜色和光标。

很遗憾,我的 less 代码不起作用

试试这个

& input[type=checkbox]:checked {
       color: #007884;
          cursor: pointer;
}

https://jsbin.com/hasuwumuxe/edit?html,css