stylesheets/normalize/_forms.scss in compass-normalize-1.3 vs stylesheets/normalize/_forms.scss in compass-normalize-1.4
- old
+ new
@@ -2,37 +2,60 @@
// ==========================================================================
// Forms
// ==========================================================================
+@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
+// Corrects margin displayed oddly in IE6/7
+
+form {
+ margin: 0;
+}
+}
+
// Define consistent border, margin, and padding.
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
// 1. Corrects color not being inherited in IE 8/9.
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
+@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
+// 3. Corrects text not wrapping in Firefox 3.
+// 4. Corrects alignment displayed oddly in IE 6/7.
+}
legend {
border: 0; // 1
padding: 0; // 2
+ @if $legacy-support-for-mozilla {
+ white-space: normal; // 3
+ }
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
+ *margin-left: -7px; // 4
+ }
}
// 1. Corrects font family not being inherited in all browsers.
// 2. Corrects font size not being inherited in all browsers.
// 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
+// 4. Improves appearance and consistency in all browsers.
button,
input,
select,
textarea {
font-family: inherit; // 1
font-size: 100%; // 2
margin: 0; // 3
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
+ vertical-align: baseline; // 4
+ *vertical-align: middle; // 4
+ }
}
// Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
// the UA stylesheet.
@@ -44,17 +67,24 @@
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
// and `video` controls.
// 2. Corrects inability to style clickable `input` types in iOS.
// 3. Improves usability and consistency of cursor style between image-type
// `input` and others.
+@if $legacy-support-for-ie7 {
+// 4. Removes inner spacing in IE 7 without affecting normal text inputs.
+// Known issue: inner spacing remains in IE 6.
+}
button,
html input[type="button"], // 1
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
+ @if $legacy-support-for-ie7 {
+ *overflow: visible;
+ }
}
// Re-set default cursor for disabled elements.
button[disabled],
@@ -62,14 +92,22 @@
cursor: default;
}
// 1. Addresses box sizing set to `content-box` in IE 8/9.
// 2. Removes excess padding in IE 8/9.
+@if $legacy-support-for-ie7 {
+// 3. Removes excess padding in IE 7.
+// Known issue: excess padding remains in IE 6.
+}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
+ @if $legacy-support-for-ie7 {
+ *height: 13px; // 3
+ *width: 13px; // 3
+ }
}
// 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
// 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
// (include `-moz` to future-proof).
\ No newline at end of file