From a78c8d9c04e83a22d6eebc2e3d54cb2ccf6b614c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 14:03:57 -0700 Subject: Newfangled input and button group sizing (fixes #9295) Instead of applying `.btn-` or `.input-` to individual elements in button and input groups, we now have new sizing classes to keep your markup a little leaner. * Add `.input-group-sm` or `.input-group-lg` to your `.input-group` to replicate `.input-sm` and `.input-lg`, respectively. * Add `.btn-group-xs`, `.btn-group-sm`, or `.btn-group-lg` to your `.btn-group` to replicate `.btn-xs`, `.btn-sm`, and `. btn-lg`, respectively. Both sets of new sizing classes simply use the existing individual sizing classes as mixins, so customization of them is automatically inherited when compiling. --- less/button-groups.less | 8 ++++++++ less/input-groups.less | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 3ae18e92f..3a9cee53e 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -117,6 +117,14 @@ } +// Sizing +// +// Remix the default button sizing classes into new ones for easier manipulation. + +.btn-group-xs > .btn { .btn-xs(); } +.btn-group-sm > .btn { .btn-sm(); } +.btn-group-lg > .btn { .btn-lg(); } + // Split button dropdowns // ---------------------- diff --git a/less/input-groups.less b/less/input-groups.less index abc399dc2..e5e6100d3 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -22,6 +22,17 @@ } } +// Sizing options +// +// Remix the default form control sizing classes into new ones for easier +// manipulation. + +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon { .input-lg(); } +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon { .input-sm(); } + + // Display as table-cell // ------------------------- .input-group-addon, -- cgit v1.2.3