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

Button line-height in Chrome #409

Closed
tobidelius opened this issue Aug 10, 2013 · 15 comments
Closed

Button line-height in Chrome #409

tobidelius opened this issue Aug 10, 2013 · 15 comments

Comments

@tobidelius
Copy link

Hi.

The default line-height for buttons doesn't seem right to me. Buttons height is 33px but should be 34px.

Line height is: 1.42857 but should be 1.428571429. We're missing some decimals.

@niedhui
Copy link

niedhui commented Aug 14, 2013

@sandelius I came to this issue today and found that we can config the sass number precision. may be this should be noted in the README :)

  ::Sass::Script::Number.precision = 10

@tobidelius
Copy link
Author

You are an angel! :)

@harmdewit
Copy link

Putting Sass::Script::Number.precision = 10 in my Rails application.rb fixed all line-heights for me.

@bsr203
Copy link

bsr203 commented Aug 16, 2013

thanks. It worked for me as well...

@wyaeld
Copy link

wyaeld commented Sep 11, 2013

👍 fix working here.

What is the most effective way to deliver this though? I'd hate to think every user needs to add this to their app.

@ifahrentholz
Copy link

Very good solution! Thanks !!

@azuby
Copy link

azuby commented Oct 22, 2013

This fix is required for input groups and all buttons to display properly. This variable is being rounded to the default 5 decimals and causing display issues: https://github.com/thomas-mcdonald/bootstrap-sass/blob/master/vendor/assets/stylesheets/bootstrap/_variables.scss#L51

@thomas-mcdonald How would you like to add this fix to the project?

glebm added a commit that referenced this issue Oct 26, 2013
@glebm
Copy link
Member

glebm commented Oct 26, 2013

Let me know if this works for you. This sets it to [10, value].max, enforcing a minimum.

@coli
Copy link

coli commented Feb 12, 2014

This really needs to go into the docs of bootstrap sass, for those not using the gem.

@thomas-mcdonald
Copy link
Member

@coli is it not fixed?

e: duh yes, of course. Back 4 months ago I think the only real way of using it was through the gem.

@glebm
Copy link
Member

glebm commented Feb 12, 2014

Bower support is still experimental, thanks for bringing this up -- Readme updated!

@jmpalacios
Copy link

This setting for the Sass number precision, where exactly do we set it when using the bower installation of bootstrap-sass, and how? As far as the package is concerned, all we get besides some informational files are the assets themselves in bower_components/bootstrap-sass/vendor/assets, but no configuration file of any kind.

The rest is just my Gruntfile with the compass target, but grunt-contrib-compass clearly states that not all compass options are exposed to grunt (and number precision certainly doesn't seem to be one of them). Do we need to shell out to a config.rb file using grunt-contrib-compass's "config" option, or something like that (e.g. the "raw" option)? In either case, what would be the configuration instruction syntax?

One suggestion is to make all this information a little bit clearer in bootstrap-sass' README file. I'd be happy to write a patch if I had the information at hand. Thanks!

@glebm
Copy link
Member

glebm commented Feb 28, 2014

I've seen this in the wild for precision: https://github.com/peerb/generator-angular/blob/fdae59428a77260eb392de643a2ae7786819234c/templates/common/Gruntfile.js#L203
It would be great if someone who uses this could do this (I am not a node guy).

@jmpalacios
Copy link

Hi @glebm!

Thanks for the pointer. That would be the equivalent of using the "config" option of grunt-contrib-compass and putting the same directive in a compass-config.rb file, or whatever, which seems a great deal cleaner to me.

I'll try it and update this issue to let you know if it works, for documentation's sake, but... one tinni tiny little problem: how to easily tell off-hand if it worked? ;)

nschonni added a commit to nschonni/wet-boew that referenced this issue Jun 18, 2014
Related to new `precision` option in node-sass that is required for
twbs/bootstrap-sass#409
gxmikey added a commit to lithiumtech/lithium-sdk that referenced this issue Mar 20, 2016
see
twbs/bootstrap-sass#409
foundation/foundation-sites#4336
for examples of how the default precision of 5 causes rounding errors
@Christiestporter
Copy link

In visual studio add "options": {"precision": 10} into your compilerconfig.json

@twbs twbs locked and limited conversation to collaborators Aug 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests