简体   繁体   English

file.css.scss和file.scss(Rails)之间的区别

[英]difference between file.css.scss and file.scss (Rails)

I've been studying Rails recently and got stuck with a question. 我最近一直在研究Rails并且遇到了一个问题。 Is there any difference in creating file.scss and file.css.scss? 创建file.scss和file.css.scss有什么区别吗? I'm using rails -v 4.2.4 我正在使用rails -v 4.2.4

I believe file.css.scss is auto generated after running rails generate when you create a new controller. 我相信在创建新控制器后运行rails generate generate后会自动生成file.css.scss Give this short blog post a read it can perhaps shed more light on your question as well as give some advice about keeping your application structure well organized. 这篇简短的博客文章阅读它可能会更多地阐明你的问题,并提供一些关于保持你的应用程序结构井井有条的建议。

Is there any difference in creating file.scss and file.css.scss 创建file.scssfile.css.scss有什么不同

Not in my experience. 不是我的经验。

Same goes for .js.coffee (we just call .coffee ) 同样适用于.js.coffee (我们只是调用.coffee

You can just call them by their actual filename, and Sprockets deals with them properly. 您可以通过实际文件名调用它们,Sprockets可以正确处理它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM