I am trying to override some of the default variables provided by bootstrap, especially some default color and font settings, but only some of them seem to take effect. Here is the top of my custom.css.scss:
$myOrange:#f89406; $myBlueDark: #304269; $myBlue: #91BED4; $myBlueLight: #D9E8F5; $myWhite: #eee; $myGrayBlue: #43464C; /* colors */ $linkColor: $myBlueDark; $navbarBackground: $myBlueDark; $navbarBackgroundHighlight: lighten($navbarBackground, 10); $navbarLinkColor: darken($myOrange, 10); $navbarLinkColorHover: $myOrange; $bodyBackground: #000; $dropdownBackground: $myBlueDark; $dropdownLinkColor: $myOrange; $hrBorder: $myBlue; $heroUnitBackground: lighten($myOrange, 20); $dropdownLinkColorHover: $myOrange; /* typography */ $sansFontFamily: 'PT Sans Narrow', 'Lucida Grande', serif; $baseFontSize: 16px; @import 'bootstrap'; // ... rest of the css ....
Here I specified the values โโfor several bootstrap variables and expected the font to be specified and the colors of the links to the values โโI set for them.
However, I noticed that only some of these values โโwork. For example. the font on my page still remains at default loading (Helvetica Neue), but the colors of the navigation bar change to the correct values.
I searched on the Internet, but none of the solutions I found worked. A problem has been reported that resembles this problem, but has since been closed: https://github.com/thomas-mcdonald/bootstrap-sass/issues/102
I would continue and comment on this topic, but I just wanted to make sure that I was not missing something.
One more note here when I explicitly do this later in my custom.css.scss:
@mixin default_font { font-family: "PT Sans Narrow", "Lucida Grande", sans-serif; font-weight: 400; } body { padding-top: 60px; background-color: #D9E8F5; @include default_font; }
Fonts display well. I am specifying background-color here due to the same problem.
I am using bootstrap-sass v2.0.3. Is there something I'm doing wrong or missing?
Thanks.
ruby-on-rails sass twitter-bootstrap
verma
source share