aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-12 14:03:57 -0700
committerMark Otto <[email protected]>2013-08-12 14:03:57 -0700
commita78c8d9c04e83a22d6eebc2e3d54cb2ccf6b614c (patch)
tree70d18a7f44fc125205430a91c33d8eda9ebe7785 /less
parentabedd38c5b4f7f9e9abfd7528b9e7679cbd46fc2 (diff)
downloadbootstrap-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.less8
-rw-r--r--less/input-groups.less11
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,