diff options
author | Mark Otto <markotto@twitter.com> | 2012-03-12 08:21:51 +0400 |
---|---|---|
committer | Mark Otto <markotto@twitter.com> | 2012-03-12 08:21:51 +0400 |
commit | ee5d2ec91aab9ec086b57a21059617355639b32c (patch) | |
tree | d5b779245ade0e1534e4f4aefdce4e0fb1d69477 /less | |
parent | c8f4325c192f97e9c8d09e7d8ad3059be694fc4c (diff) |
add block level input mixin for border-box box-sizing
Diffstat (limited to 'less')
-rw-r--r-- | less/mixins.less | 13 | ||||
-rw-r--r-- | less/responsive.less | 9 |
2 files changed, 13 insertions, 9 deletions
diff --git a/less/mixins.less b/less/mixins.less index 8ff5efe503..b01a32b43f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -107,6 +107,7 @@ white-space: nowrap; } + // FONTS // -------------------------------------------------- @@ -142,9 +143,19 @@ } -// Form field states (used in forms.less) +// FORMS // -------------------------------------------------- +// Block level inputs +.input-block-level { + display: block; + width: 100%; + min-height: 28px; /* Make inputs at least the height of their button counterpart */ + /* Makes inputs behave like true block-level elements */ + .box-sizing(border-box); +} + + // Mixin for form field states .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) { // Set the text color diff --git a/less/responsive.less b/less/responsive.less index 6399c1ecdf..c403760f01 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -182,14 +182,7 @@ select[class*="span"], textarea[class*="span"], .uneditable-input { - display: block; - width: 100%; - min-height: 28px; /* Make inputs at least the height of their button counterpart */ - /* Makes inputs behave like true block-level elements */ - -webkit-box-sizing: border-box; /* Older Webkit */ - -moz-box-sizing: border-box; /* Older FF */ - -ms-box-sizing: border-box; /* IE8 */ - box-sizing: border-box; /* CSS3 spec*/ + .input-block-level(); } // But don't let it screw up prepend/append inputs .input-prepend input[class*="span"], |