gpt4 book ai didi

css - Rails CSS 编译

转载 作者:太空宇宙 更新时间:2023-11-04 14:14:19 25 4
gpt4 key购买 nike

我最近为一个 Rails 应用运行了 bundle install,它在我的 vendor 文件夹中放置了一个 ruby​​ 文件夹,其中包含 bin、cache、doc、gem 等。

这样做之后,我的 CSS 样式似乎遇到了冲突。我正在使用 bootstrap 和覆盖文件,但是在我的样式困惑的地方,我注意到 :before 和 :after 在检查元素时出现在奇怪的地方。

某些元素似乎失去了样式,但其他元素看起来还不错。我猜我的样式在某处被覆盖了,但我不明白这是怎么发生的。

任何人都可以帮助我了解将来如何解决和避免这种情况吗?我的供应商文件夹似乎覆盖了我实现的样式。

我的应用程序.css.scss

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require font-awesome
*= require bootstrap_and_overrides
*/

最佳答案

将 require_self 移到 list 文件的最后一行。

关于css - Rails CSS 编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20480637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com