twitter/bootstrap — Issue #769: Formatting of input fields in container-app example relies on whitespace in html
Author: ckdake
Created: 2011-12-07 17:09:04+00:00
State: open

This is related to https://github.com/twitter/bootstrap/issues/444 which I am not able to re-open

The apparent margins in http://twitter.github.com/bootstrap/examples/container-app.html on the form fields in the navigation bar are from the whitespace between the tags. When any tool is used to compress whitespace in html and the tags are moved to be adjacent with no space between them, the apparent margin disappears.

I think this is a bug as the style should be wholy contained in the CSS and not dependent on arbitrary whitespace in the markup. A railsy example:

```ruby
= text_field_tag :email, params[:email], placeholder: 'Username', class: 'input-small'
= password_field_tag :password, params[:password], placeholder: 'Password', class: 'input-small'
```

Generates:
```html

```

Looks (incorrectly) like:
![incorrect](https://img.skitch.com/20111207-ksi84gw2j6ui933kmqegwcg187.jpg)

```ruby
= text_field_tag :email, params[:email], placeholder: 'Username', class: 'input-small'
= " "
= password_field_tag :password, params[:password], placeholder: 'Password', class: 'input-small'
= " "
```

Generates:
```html

```

Looks (correct) like:
![correct](https://img.skitch.com/20111207-1x3mr98rb78swcs1nx8nxkdsxn.jpg)

Seems to me like a bug that should be fixed, but I don't know the best way to go about doing this in the CSS.