diff options
| author | Mark Otto <[email protected]> | 2013-08-12 14:03:57 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-08-12 14:03:57 -0700 |
| commit | a78c8d9c04e83a22d6eebc2e3d54cb2ccf6b614c (patch) | |
| tree | 70d18a7f44fc125205430a91c33d8eda9ebe7785 /less | |
| parent | abedd38c5b4f7f9e9abfd7528b9e7679cbd46fc2 (diff) | |
| download | bootstrap-a78c8d9c04e83a22d6eebc2e3d54cb2ccf6b614c.tar.xz bootstrap-a78c8d9c04e83a22d6eebc2e3d54cb2ccf6b614c.zip | |
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.
Diffstat (limited to 'less')
| -rw-r--r-- | less/button-groups.less | 8 | ||||
| -rw-r--r-- | less/input-groups.less | 11 |
2 files changed, 19 insertions, 0 deletions
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, |
