From 6ec0fd7d43d1ab243a8796b7544a4634ef086117 Mon Sep 17 00:00:00 2001 From: ggam Date: Tue, 13 Aug 2013 19:06:02 +0200 Subject: [PATCH] Added input-size mixin --- less/forms.less | 38 ++++---------------------------------- less/mixins.less | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/less/forms.less b/less/forms.less index af575db225..18d3efb547 100644 --- a/less/forms.less +++ b/less/forms.less @@ -208,43 +208,13 @@ input[type="number"] { } - // Form control sizing -// -// Relative text size, padding, and border-radii changes for form controls. For -// horizontal sizing, wrap controls in the predefined grid classes. `` +// element gets special love because it's special, and that's a fact! + +.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { + height: @input-height; + padding: @padding-vertical @padding-horizontal; + font-size: @font-size; + line-height: @line-height; + border-radius: @border-radius; + + select& { + height: @input-height; + line-height: @input-height; + } + + textarea& { + height: auto; + } +}