给定以下 .scss 文件
@import 'vendor/bootstrap-sass/bootstrap';
.item1 {
@extend .row;
}
.item2 {
@extend .panel;
}
为什么扩展.row
可以编译但是扩展.panel
编译失败?
错误输出:
Syntax error: ".item2" failed to @extend ".panel".
The selector ".panel" was not found.
Use "@extend .panel !optional" if the extend should be able to fail.
最佳答案
.panel
存在于Boostrap 3.0 components , 但不适用于 Boostrap 2.3 .检查您的版本并更新您的 @extend
!
关于css - 我需要从 Twitter 的 Bootstrap 导入什么来扩展 .panel 类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24737530/