使用 Fourseven:scss 在 Meteor 中加载 css [英] Load css in Meteor with Fourseven:scss
问题描述
我正在使用fourseven:scss 来编译scss 文件.如果我在客户端目录下包含我的 .scss
文件,这似乎工作正常.但是,我想将它们放在 /imports/ui/stylesheets/
中的组件附近,或者放在 /imports/ui/components/
中的组件旁边.只是当我把它们留在那里时,似乎什么也没有发生.
I'm using fourseven:scss to compile scss files. This seems to work fine if I include my .scss
files under the client directory. However I'd like to leave them near my components either in /imports/ui/stylesheets/
or else right next to the components in /imports/ui/components/
. It's just that nothing seems to happen when I leave them there.
fourseven 文档 说包搜索所有目录并符合 .css
它找到的任何 .scss
文件中的文件.然后将它们打包并发送到浏览器.当我将 .scss
放在客户端目录中时,我可以看到资源merged-stylesheets-prefixed.css".当我把它放在导入下时,我什么也看不到.
The fourseven documentation says that the packages searches all directories and complies .css
files from any .scss
files it finds. These are then packaged up and sent down to the browser. I can see a resource "merged-stylesheets-prefixed.css" when I put my .scss
in the client directory. I just can't see anything when I put it under imports.
我如何控制这种行为?
推荐答案
尝试在 client
文件夹中创建一个 main.scss
文件,然后从那里导入所有其他文件,例如:
Try creating a main.scss
file in the client
folder and from there import all your other files, like e.g.:
@import "{}/imports/ui/components/_ComponentABC.scss";
有用吗?
这篇关于使用 Fourseven:scss 在 Meteor 中加载 css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!