这是一个后端程序员。只是看着使用scss,它在前端有明显的好处。
这就是我认为会让我@import bootstrap.css和@extend bootstrap类选择器。 bootstrap.css,此scss与此.scss文件位于同一目录中
// styles.scss
@import "bootstrap.css";
#menu-top {
@extend .navbar-fixed-top;
}
但是,我得到了这个
// generated styles.css
Error: "\#menu-top" failed to @extend ".navbar-fixed-top".
The selector ".navbar-fixed-top" was not found.
Use "@extend .navbar-fixed-top !optional" if the extend should be
able to fail.
on line 19 of links_style.scss
Use --trace for backtrace.
答案 0 :(得分:1)
我可以看到您正在导入css
引导程序版本。您必须导入scss
版本才能从中导出任何样式。