我正在使用 spree 2.1.5、rails 4.0.2、sass-rails 4.0.0。
spree 文档位于 http://guides.spreecommerce.com/developer/asset.html表示使用 vendor/assets/stylesheets 文件夹。但是,我在 Github 和其他谷歌搜索中看到的关于 spree 样式表覆盖的示例显示许多人使用 app/assets/stylesheets 文件夹。
是否最好覆盖文件夹 my_store/app/assets/stylesheets 中的 spree 样式?还是 my_store/vendor/assets/stylesheets?
最佳答案
我把我的 css 放在“正常”的地方——在应用程序/ Assets /样式表中,没有任何改变。我将我的 css 放在 vendor/assets/stylesheets 文件夹中,并应用了它们。
使用 Spree 与使用“Rails”非常不同 - 尽管 spree 运行在 Rails 服务器上。该过程从“文件在哪里?”开始。并从那里变得更加奇怪。这就是为什么我放弃它而使用自定义解决方案。在许多情况下,学习如何修改/定制 Spree 比从头开始编写新的解决方案(对于我们实际需要的部分)需要更长的时间。
关于css - 覆盖 spree Assets ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22076842/