简体   繁体   English

覆盖Rails中的基础顶部栏

[英]Overriding Foundation Top Bar in Rails

I am trying to override the settings for the top bar in the foundation framework. 我试图覆盖基础框架顶部栏的设置。 So far tried a lot of combinations without success. 到目前为止,尝试了很多组合,但均未成功。 My current settings are below. 我当前的设置如下。 It doesn't seem to be picking up the changes 它似乎并没有接受变化

Gemfile 的Gemfile

    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'foundation-rails'
gem 'sass-rails', '~> 4.0.3'

foundation_and_overrides.scss foundation_and_overrides.scss

$topbar-bg-color: #e6e6e6;
$topbar-bg: $topbar-bg-color;

I eventually plan to move it out of the overrides file 我最终计划将其移出替代文件

This was as simple enough as adding some custom SCSS 这就像添加一些自定义SCSS一样简单

   .top-bar {

  background: #615f5e;

}

Though I am still not sure where those variables in the overrides file are used. 虽然我仍然不确定覆盖文件中的那些变量在哪里使用。

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

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