相关疑难解决方法(0)

在SCSS中包含另一个类

我在我的SCSS文件中有这个:

.class-a{
  display: inline-block;
  //some other properties
  &:hover{
   color: darken(#FFFFFF, 10%);
 }  
}

.class-b{

 //Inherite class-a here

 //some properties
}
Run Code Online (Sandbox Code Playgroud)

在class-b中,我想继承所有属性和嵌套声明class-a.这是怎么做到的?我尝试使用@include class-a,但这只是在编译时抛出错误.

inheritance sass

265
推荐指数
5
解决办法
21万
查看次数

标签 统计

inheritance ×1

sass ×1