twitter/bootstrap — pull request #1623 by jimryan (2012-02-02 19:24:06+00:00)
Title: Fix legend margin collapse across all (most) browsers

On webkit, legends collapse margins, which d8e1001836f869436df2de2905411b2236c8cbad addresses. However, on browsers that don't do this, that fix creates ~double margin between the legend and first control-group. My solution is to never set margin on the legend, and instead always set it on the very next .control-group. Should work in every browser that supports the adjacent sibling selector, which is all except ie6, I believe.

Also, that fix only applied to horizontal forms, I applied the styles to all forms, as they're all affected by this.