From: Mark Otto Date: Sun, 29 Jan 2012 00:37:43 +0000 (-0800) Subject: remove padding from first-child of inline radios/checkboxes X-Git-Tag: v2.0.0~6^2~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=475b985a0efaf534b56089f12c570d7861ce72f5;p=thirdparty%2Fbootstrap.git remove padding from first-child of inline radios/checkboxes --- diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index e928bb6d1e..1b572090c9 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -596,6 +596,9 @@ input[type="hidden"] { .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } +.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child { + padding-top: 5px; +} input, textarea { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); diff --git a/less/forms.less b/less/forms.less index b0daeb034e..69ddbcac93 100644 --- a/less/forms.less +++ b/less/forms.less @@ -175,6 +175,11 @@ input[type="hidden"] { .checkbox.inline + .checkbox.inline { margin-left: 10px; // space out consecutive inline controls } +// But don't forget to remove their padding on first-child +.controls > .radio.inline:first-child, +.controls > .checkbox.inline:first-child { + padding-top: 5px; // has to be padding because margin collaspes +}