我一直在尝试像疯子一样让下面的LESS声明起作用,但现在我担心它不会发生:/所以我现在转向你们这些人最后寻求帮助!
我有以下声明:
- .top{
- &-first{
- background:black;
- &-item{
- color:white;
- }
- }
- &-second{
- background:green;
- &-item:extend(.top-first-item){}
- }
- }
我希望得到以下输出:
- .top-first {
- background: black;
- }
- .top-first-item,.top-second-item{
- color: white;
- }
- .top-second {
- background: green;
- }
但不幸的是,它没有编译,但相反:
- .top-first {
- background: black;
- }
- .top-first-item{
- color: white;
- }
- .top-second {
- background: green;
- }