From 0016c17f9307bc71fc96d8d4680a9c861f137cae Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 23:18:28 -0800 Subject: Switch to `&:extend(.clearfix all)` for clearfix mixin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original discussion: https://github.com/less/less.js/issues/1437#issuecomment-21383639. Since we’re switching to `grunt-contrib-less`, we can take advantage of newer LESS features than what RECESS supported. Included in that is the ability to `:extend`, and not only that, but `:extend(.mixin-name all)`. By doing so, we remove duplicate CSS for all our elements that were being clearfix-ed. Fixes #8947, #8968, #8991, #9257, #9268, #9291, #9430, #9604, #9686, #9929, #10731, #10793, #11305, #11498, #11533, #11570, #11604, #11652. (dem issues, tho) --- less/button-groups.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/button-groups.less') diff --git a/less/button-groups.less b/less/button-groups.less index 05fda149a..ef9c34e77 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -37,7 +37,7 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { - .clearfix(); + &:extend(.clearfix all); .btn-group { float: left; @@ -157,7 +157,7 @@ // Clear floats so dropdown menus can be properly placed > .btn-group { - .clearfix(); + &:extend(.clearfix all); > .btn { float: none; } -- cgit v1.2.3 From 544b8ecab78c322bf826797374c0b10279cedf1f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 16:03:21 -0800 Subject: Fixes #10921: Add support for input groups within button toolbars * Floats any `.input-group` within a toolbar * Simplifies the CSS to remove sibling selectors and instead use a negative amrgin on the parent with only `margin-left` See it in action: http://jsbin.com/aGEcUqAT/1/. --- less/button-groups.less | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'less/button-groups.less') diff --git a/less/button-groups.less b/less/button-groups.less index ef9c34e77..794839d62 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -37,18 +37,17 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { + margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); - .btn-group { + .btn-group, + .input-group { float: left; } - // Space out series of button groups > .btn, - > .btn-group { - + .btn, - + .btn-group { - margin-left: 5px; - } + > .btn-group, + > .input-group { + margin-left: 5px; } } -- cgit v1.2.3