Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to Bootstrap Font Variables not working #333

Closed
AnalogJ opened this issue Apr 23, 2013 · 5 comments
Closed

Changes to Bootstrap Font Variables not working #333

AnalogJ opened this issue Apr 23, 2013 · 5 comments

Comments

@AnalogJ
Copy link

AnalogJ commented Apr 23, 2013

In my marketing.css.scss file I have the following:

 ..snip..
//override base font values;
$sansFontFamily: 'Open Sans', sans-serif;
$baseFontSize: 14px;              //NOTE: THIS IS NOT WORKING
$fontSizeLarge: 24px;              //NOTE: THIS IS NOT WORKING.
$paddingLarge:          15px 50px;
$headingsFontWeight:    normal;
..snip..
@import 'bootstrap';

Unfortunately, as I note above, any changes to the fontSizeLarge and baseFontSize variables do not seem to have any effect on the generated Bootstrap css file.

@theoptips
Copy link

I always have to make sure that the right controller is mapped to the corresponding layout (unless application wide) and the corresponding scss file. The arrangement of precedence matters. Just brainstorm some pointers

@AnalogJ
Copy link
Author

AnalogJ commented Apr 23, 2013

Hi @theoptips, thanks for the help, but it is an application wide css file, with no other import statements. All my other variables work perfectly, that's what confuses me. I have checked to make sure the gem is updated as well:

 gem 'sass-rails',   '~> 3.2'
 gem 'bootstrap-sass', '~> 2.3.1.0'

@theoptips
Copy link

marketing.css.scss shows me that it is a specific scss styling for views in the marketing controller

can you check your view/layout file? marketing.html.erb? If stylesheet isn't linked to the corresponding scss file, styling won't take effect.

<%= stylesheet_link_tag "placeholder" %>
<%= javascript_include_tag "placeholder" %>
<%= csrf_meta_tags %>

http://guides.rubyonrails.org/layouts_and_rendering.html#linking-to-css-files-with-the-stylesheet_link_tag

Got an online repo to share? :3

@rubyistdotjs
Copy link

$baseFontSize works for me but not the others ($fontSizeLarge, $fontSizeSmall and $fontSizeMini)

$baseFontSize: 10px;
$fontSizeLarge: 13px;
$fontSizeSmall: 14px;
$fontSizeMini: 16px;

@import 'bootstrap';

.test {
  font-size: $baseFontSize;  // 10px
  font-size: $fontSizeLarge; // 12.5px (which is 10 * 1.25)
  font-size: $fontSizeSmall; // 8.5px (10 * 0.85)
  font-size: $fontSizeMini;  // 7.5px (10 * 0.75)
}

This error come from _bootstrap-sass/vendor/assets/stylesheets/bootstrap/variables.scss
There's simply no !default for $fontSizeLarge, $fontSizeSmall and $fontSizeMini. (line 65, 66 and 67).

@thomas-mcdonald
Copy link
Member

I just pushed 2.3.1.1, which fixes this. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants