Rails的问题7样式表

发布于 2025-01-26 07:22:21 字数 275 浏览 3 评论 0原文

我想知道为什么Rails不会在app/Assets/stylesheets中创建.css文件,例如,当我生成一个新的脚手架时。 App/Assets/stylesheetsapplication.css

我的文件

I wanna know why Rails doesn't create the .css files in app/assets/stylesheets when I generate, for example, a new scaffold. The only file in app/assets/stylesheets is application.css

my file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

開玄 2025-02-02 07:22:21

看起来它在这里被删除了: https://github.com/rails/rails/rails/rails/rails/rails/pull/43110

拉的请求中的解释:

现代的Web应用程序更有可能不使用CSS框架,例如Tailwind,Bootstrap或Bulma。铁轨不应该生成人均样式表,好像我们仍在手工编写所有内容。

此外,Sass还选择专注于Dart-Sass,这需要默认情况下导轨不会采用的各种依赖项。因此,减少我们对Sass的依赖,并将其移至可选的额外。

Looks like it was removed here: https://github.com/rails/rails/pull/43110

Explanation in the pull request:

Modern web applications are more likely than not to use a CSS framework like Tailwind, Bootstrap, or Bulma. Rails shouldn't be generating per-model stylesheets as though we were still writing everything by hand.

Also, Sass has chosen to focus exclusively on dart-sass, which requires all manner of dependencies that Rails won't adopt by default. So decrease our reliance on Sass, and move it to being an optional extra.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文