In Sass, how to reference two parent classes with ampersand to compound with an element?

前端 未结 2 1929
渐次进展
渐次进展 2021-01-15 02:29

Using the method found here, it works, but not for two parent classes.

For instance:

.one, .two {
  @at-root a#{&} {
    color: blue;
  }
}
         


        
2条回答
  •  既然无缘
    2021-01-15 03:15

    Or you simply switch to stylus:

    .one,
     .two {
       a& {
       color: blue;
     }
    }
    

    Codepen Example

提交回复
热议问题