SCSS extend a nested selector and override the nested rulesets

前端 未结 4 693
滥情空心
滥情空心 2020-11-29 07:20

Ok so I have a placeholder with a nested selector:

%block {
  .title {
    font-size:12px;
  }
}

I want to extend it and ADD to the .

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 08:04

    LESS can do that. However you would write:

    .superblock {
      .title {
        .block .title;
      }
    }
    

    Not sure if it works with @extend too.

提交回复
热议问题