我使用 Laravel 5 和 Elixir。
我有app.scss哪些导入_bootstrap.csss(由 bower 安装),这些文件被编译为一个文件public/css/app.css。
此外,我在其他依赖项中有一些 CSS 文件(由 bower 安装),我想将它们添加到public/css/app.css.
我该怎么做?
我使用 Laravel 5 和 Elixir。
我有app.scss哪些导入_bootstrap.csss(由 bower 安装),这些文件被编译为一个文件public/css/app.css。
此外,我在其他依赖项中有一些 CSS 文件(由 bower 安装),我想将它们添加到public/css/app.css.
我该怎么做?
First you'll need to rename your .css file as a .scss file, then you can import the new .scss file into the app.scss file using the same method _bootstrap.scss is imported.
@import "path/to/css/file.scss";
在您的 app.scss 文件中,您可以导入两种格式 .scss 和 .css
要导入 SCSS 文件,这是 sintax:(不带扩展名)
@import '~bootstrap/scss/bootstrap';
要导入 CSS 文件,您必须添加 .css 扩展名
@import "~jquery-ui/themes/base/core.css";