From 3ad034ea9671ffbc44278085ca3bb30979808278 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Sep 2011 17:36:15 -0700 Subject: fix legends in ie7 --- lib/forms.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/forms.less') diff --git a/lib/forms.less b/lib/forms.less index 2333718e0..fc30618a4 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -19,9 +19,9 @@ fieldset { padding-left: 150px; font-size: @basefont * 1.5; line-height: 1; - *margin: 0 0 5px 145px; /* IE6-7 */ - *line-height: 1.5; /* IE6-7 */ color: @grayDark; + *padding: 0 0 5px 145px; /* IE6-7 */ + *line-height: 1.5; /* IE6-7 */ } } -- cgit v1.2.3 From 18a5ef83eff25130927e5b3a5ffb522752974eb8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Sep 2011 18:01:29 -0700 Subject: fix legends in ie7 --- lib/forms.less | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/forms.less') diff --git a/lib/forms.less b/lib/forms.less index fc30618a4..a1fdbd937 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -108,6 +108,9 @@ input[type=file] { height: @baseline * 1.5; line-height: @baseline * 1.5; } +select { + float: left; +} textarea { height: auto; -- cgit v1.2.3 From f3f60b21a6104be999cb04f6414878fc4dea98cd Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Sep 2011 18:09:01 -0700 Subject: oops, double commit last time; apply fixes to make select elements line up in IE7 with their labels, but no height fix --- lib/forms.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/forms.less') diff --git a/lib/forms.less b/lib/forms.less index a1fdbd937..90b8720f0 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -105,11 +105,9 @@ input[type=submit] { select, input[type=file] { - height: @baseline * 1.5; + height: @baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size line-height: @baseline * 1.5; -} -select { - float: left; + *margin-top: 4px; /* For IE7, add top margin to align select with labels */ } textarea { -- cgit v1.2.3 From 53812bc2d82adb1a4a96afb33391a1d59990c4fe Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Sep 2011 18:44:25 -0700 Subject: remove qualifying tags in .span selectors for built in grid so that we can use .span-n classes in form styles --- lib/forms.less | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'lib/forms.less') diff --git a/lib/forms.less b/lib/forms.less index 90b8720f0..c86751193 100644 --- a/lib/forms.less +++ b/lib/forms.less @@ -184,6 +184,7 @@ form div.error { } // Form element sizes +// TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes .input-mini, input.mini, textarea.mini, @@ -224,6 +225,34 @@ textarea.xxlarge { overflow-y: auto; } +// Grid style input sizes +// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border +.formColumns(@columnSpan: 1) { + width: ((@gridColumnWidth - 10) * @columnSpan) + ((@gridColumnWidth - 10) * (@columnSpan - 1)); + margin-left: 0; +} +input, +textarea, +select { + // Default columns + &.span1 { .formColumns(1); } + &.span2 { .formColumns(2); } + &.span3 { .formColumns(3); } + &.span4 { .formColumns(4); } + &.span5 { .formColumns(5); } + &.span6 { .formColumns(6); } + &.span7 { .formColumns(7); } + &.span8 { .formColumns(8); } + &.span9 { .formColumns(9); } + &.span10 { .formColumns(10); } + &.span11 { .formColumns(11); } + &.span12 { .formColumns(12); } + &.span13 { .formColumns(13); } + &.span14 { .formColumns(14); } + &.span15 { .formColumns(15); } + &.span16 { .formColumns(16); } +} + // Disabled and read-only inputs input[disabled], select[disabled], -- cgit v1.2.3