From aad447e29075b52a46931be17a9be4016cc89ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 7 Nov 2013 20:58:17 +0100 Subject: Fix #11400 and #11431 --- less/input-groups.less | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'less/input-groups.less') diff --git a/less/input-groups.less b/less/input-groups.less index 8516a79e9..a70decc58 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -121,16 +121,26 @@ &:last-child > .btn { margin-left: -1px; } -} -.input-group-btn > .btn { - position: relative; - // Jankily prevent input button groups from wrapping - + .btn { - margin-left: -4px; - } - // Bring the "active" button to the front - &:hover, - &:active { - z-index: 2; + + > .btn { + position: relative; + + &:not(:first-of-type):not(:last-of-type) { + border-radius: 0; + } + + // Jankily prevent input button groups from wrapping + + .btn { + margin-left: -4px; + } + + .btn:last-of-type { + margin-left: -5px; + } + + // Bring the "active" button to the front + &:hover, + &:active { + z-index: 2; + } } } -- cgit v1.2.3 From 3b5e0c9a3cae9bfae38253ae153a3426d1f81ad3 Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Tue, 10 Dec 2013 16:47:12 +0100 Subject: hide space characters in input-group-btn to fix segmented buttons double border --- less/input-groups.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'less/input-groups.less') diff --git a/less/input-groups.less b/less/input-groups.less index d19c4c64a..dc6e825f0 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -112,7 +112,10 @@ // ------------------------- .input-group-btn { position: relative; + // Jankily prevent input button groups from wrapping white-space: nowrap; + // in combination with inline-blocks and nowrap, space characters would take visible space + font-size: 0; // Negative margin to only have a 1px border between the two &:first-child > .btn { @@ -124,9 +127,8 @@ } .input-group-btn > .btn { position: relative; - // Jankily prevent input button groups from wrapping + .btn { - margin-left: -4px; + margin-left: -1px; } // Bring the "active" button to the front &:hover, -- cgit v1.2.3 From 432b9f9cde8e2b067fd54ed148c5f8df510e30c5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 20:04:12 -0800 Subject: Fixes #11561: Add float: left; to .form-control within input groups to prevent IE9 from screwing up placeholder text and select menu arrows --- less/input-groups.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less/input-groups.less') diff --git a/less/input-groups.less b/less/input-groups.less index 0eb9a6fc4..39f705ad3 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -17,6 +17,11 @@ } .form-control { + // IE9 fubars the placeholder attribute in text inputs and the arrows on + // select elements in input groups. To fix it, we float the input. Details: + // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 + float: left; + width: 100%; margin-bottom: 0; } -- cgit v1.2.3 From ae640d4f1cea3b12fcfbf2d6c8d5bb3c29c9aadf Mon Sep 17 00:00:00 2001 From: Sebastian Podjasek Date: Mon, 16 Dec 2013 22:47:09 +0100 Subject: Fix handling of btn-group placed inside input-group-btn (used for mixing dropdowns with normal buttons) --- less/input-groups.less | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'less/input-groups.less') diff --git a/less/input-groups.less b/less/input-groups.less index de1e68903..b486cf4d2 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -95,8 +95,10 @@ .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { .border-right-radius(0); } .input-group-addon:first-child { @@ -105,8 +107,10 @@ .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { .border-left-radius(0); } .input-group-addon:last-child { @@ -138,10 +142,16 @@ } // Negative margin to only have a 1px border between the two - &:first-child > .btn { - margin-right: -1px; + &:first-child { + > .btn, + > .btn-group { + margin-right: -1px; + } } - &:last-child > .btn { - margin-left: -1px; + &:last-child { + > .btn, + > .btn-group { + margin-left: -1px; + } } } -- cgit v1.2.3