]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Added button-size mixin 9373/head
authorggam <ggam@brainleakage.com>
Mon, 12 Aug 2013 12:07:19 +0000 (14:07 +0200)
committerggam <ggam@brainleakage.com>
Mon, 12 Aug 2013 12:07:19 +0000 (14:07 +0200)
less/buttons.less
less/mixins.less

index 8dc05e824cc2cab4972611be8b69d24e157da211..e3551535817204938ad56c1e954e30880c46859f 100644 (file)
 // --------------------------------------------------
 
 .btn-lg {
-  padding: @padding-large-vertical @padding-large-horizontal;
-  font-size: @font-size-large;
-  line-height: @line-height-large; // ensure even-numbered height of button next to large input
-  border-radius: @border-radius-large;
+  // line-height: ensure even-numbered height of button next to large input
+  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
 }
 .btn-sm,
 .btn-xs {
-  padding: @padding-small-vertical @padding-small-horizontal;
-  font-size: @font-size-small;
-  line-height: @line-height-small; // ensure proper height of button next to small input
-  border-radius: @border-radius-small;
+  // line-height: ensure proper height of button next to small input
+  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
 }
 .btn-xs {
   padding: 3px 5px;
index e58e602d385d3b4c53766c8fda0be1207afd774b..63196448f4bb7e670c58e089d12928b37109cc81 100644 (file)
   }
 }
 
+// Button sizes
+// -------------------------
+.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
+  padding: @padding-vertical @padding-horizontal;
+  font-size: @font-size;
+  line-height: @line-height;
+  border-radius: @border-radius;
+}
+
 // Labels
 // -------------------------
 .label-variant(@color) {