SASS,@import并将其抽象化
有没有办法@import一个文件并将它包含的所有类抽象化 让我举一个例子来解释:SASS,@import并将其抽象化,sass,Sass,有没有办法@import一个文件并将它包含的所有类抽象化 让我举一个例子来解释: @import "bootstrap"; //Do something magic to make all classes abstract .my-bem__custom{ @extend .btn } 它应该以以下方式输出css文件: //Not any bootstrap stuff here .my-bem__custom { display: inline-block; margin-bot
@import "bootstrap"; //Do something magic to make all classes abstract
.my-bem__custom{
@extend .btn
}
它应该以以下方式输出css文件:
//Not any bootstrap stuff here
.my-bem__custom {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
不,萨斯没有那样的。如果有,它将在文档中引用。谢谢你的回答,知道其他CSS扩展(如LESS)是否可以做到这一点吗?我不使用其他CSS预处理器。如果你想知道的话,我建议你检查一下他们的文件。