aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorKevin Kirsche <[email protected]>2015-01-29 08:19:09 -0500
committerKevin Kirsche <[email protected]>2015-02-19 18:02:51 -0500
commit0ee76022841b1ef4ad48050680dafe4ea43f5967 (patch)
tree2db6074cda6dd8d3f14a02c8a0aeb1a39a66c21e /less/forms.less
parenta7747dedf24b1a7245bc3088f265280873acd627 (diff)
downloadbootstrap-0ee76022841b1ef4ad48050680dafe4ea43f5967.tar.xz
bootstrap-0ee76022841b1ef4ad48050680dafe4ea43f5967.zip
[Fixes #15691] .form-control-static changes height when empty
[Fixes #15691] .form-control-static changes height when empty by setting the minimum height to the size it is when text is in the `.form-control-static` JSFiddle: http://jsfiddle.net/4pdo4yzo/ Compute the minimum height @line-height-computed = ~20px @font-size-base = 14px This should come to approx. 34px Add min-height to from-group-* per @cvrebert I had this wrong. The minimum height would depend on the font-size of that specific group, thus we need to declare it once for font-size-small and once also for font-size-large
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less3
1 files changed, 3 insertions, 0 deletions
diff --git a/less/forms.less b/less/forms.less
index 3138c2c51..a0840cd4f 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -294,6 +294,7 @@ input[type="checkbox"] {
padding-bottom: (@padding-base-vertical + 1);
// Remove default margin from `p`
margin-bottom: 0;
+ min-height: (@line-height-computed + @font-size-base);
&.input-lg,
&.input-sm {
@@ -323,6 +324,7 @@ input[type="checkbox"] {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: @line-height-small;
+ min-height: (@line-height-computed + @font-size-small);
}
}
@@ -338,6 +340,7 @@ input[type="checkbox"] {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
+ min-height: (@line-height-computed + @font-size-large);
}
}