ruby-on-rails 如何避免导入的css覆盖其他css

a64a0gku  于 12个月前  发布在  Ruby
关注(0)|答案(1)|浏览(135)

@import "compass";将覆盖

*= require_tree ../lenord-single-page-theme/css
*= require_tree ../ace-admin-theme/css

字符串
如何导入@compass而不覆盖其他css文件?
application.css

@import "compass";

/*
 * 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_tree ../lenord-single-page-theme/css
 *= require_tree ../ace-admin-theme/css
 *= require_self
 *= require_tree .
 */

6pp0gazn

6pp0gazn1#

尝试将@import移动到文件的底部。如果不起作用,请告诉我,我将尝试找到解决方案。此外,(如果它在您的情况下起作用,请尝试标记被!IMPORTANT覆盖的2行

相关问题