thoughtbot / bitters

Add a dash of pre-defined style to your Bourbon.
https://thoughtbot.com
MIT License
1.39k stars 142 forks source link

Padding and margin-bottom for forms is missing unit #99

Closed mm53bar closed 10 years ago

mm53bar commented 10 years ago

My forms didn't look as pretty as the examples on the bitters site. It looks like Chrome didn't like the calculated padding and margin-bottom because it was missing the em unit.

I changed lines 40 & 41 in _forms.scss from this:

 margin-bottom: $base-line-height / 2;
 padding: ($base-line-height / 3) ($base-line-height / 3);

to this:

 margin-bottom: #{$base-line-height / 2}em;
 padding: #{$base-line-height / 3}em #{$base-line-height / 3}em;

and everything seems OK now. If this makes sense to you then I can submit a pull request.

tysongach commented 10 years ago

Hi Michael,

We recently made a change which makes the $base-line-height variable unit-less and added a $base-spacing variable which does have a unit and can be used for common, reusable spacing. The latest version of Bitters uses $base-spacing for the margins and padding on form elements. It’s likely that you have an out-of-date version, around when we were making these changes.