Skip to content

Commit

Permalink
Remove support for IE6-7 and Firefox 29 from normalize mixin. #89
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Oct 17, 2016
1 parent 33e6576 commit c6ce01a
Show file tree
Hide file tree
Showing 28 changed files with 10 additions and 3,629 deletions.
1 change: 0 additions & 1 deletion sass/_normalize.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import 'support-for';
@import 'normalize/variables';
@import 'normalize/vertical-rhythm';
@import 'normalize/normalize-mixin';
64 changes: 0 additions & 64 deletions sass/_support-for.scss

This file was deleted.

84 changes: 10 additions & 74 deletions sass/normalize/_normalize-mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
@return false;
}

@mixin _normalize-monospace() {
font-family: monospace, monospace;
@if support-for(ie, 6) {
_font-family: 'courier new', monospace;
}
font-size: 1em;
}

@mixin normalize($include: (all), $exclude: ()) {
// Initialize the helper function by passing it this mixin's parameters.
$init: _normalize-include($include, $exclude);
Expand Down Expand Up @@ -61,9 +53,9 @@
*/

html {
@if $normalize-vertical-rhythm or support-for(ie, 7) {
// Correct text resizing oddly in IE 6/7 when body `font-size` is set using
// `em` units.
@if $normalize-vertical-rhythm {
// Correct old browser bug that prevented accessible resizing of text
// when root font-size is set with px or em.
font-size: ($base-font-size / 16px) * 100%;
}
@if $normalize-vertical-rhythm {
Expand Down Expand Up @@ -117,10 +109,6 @@
progress,
video {
display: inline-block;
@if support-for(ie, 7) {
*display: inline;
*zoom: 1;
}
}

/**
Expand Down Expand Up @@ -217,7 +205,8 @@
code,
kbd,
samp {
@include _normalize-monospace();
font-family: monospace, monospace;
font-size: 1em;
}

/**
Expand All @@ -243,7 +232,7 @@
@include normalize-margin(1 0, $h1-font-size);
}

@if $normalize-vertical-rhythm or support-for(ie, 7) {
@if $normalize-vertical-rhythm {
h2 {
@include normalize-font-size($h2-font-size);
@if $normalize-vertical-rhythm {
Expand Down Expand Up @@ -334,10 +323,6 @@

img {
border-style: none;
@if support-for(ie, 7) {
/* Improve image quality when scaled in IE 7. */
-ms-interpolation-mode: bicubic;
}
}

/**
Expand All @@ -353,7 +338,7 @@
/* Grouping content
========================================================================== */

@if $normalize-vertical-rhythm or support-for(ie, 7) {
@if $normalize-vertical-rhythm {
/**
* Set 1 unit of vertical rhythm on the top and bottom margin.
*/
Expand All @@ -362,10 +347,6 @@
@include normalize-margin(1 $indent-amount);
}

/**
* Address margins set differently in IE 6/7.
*/

dl,
menu,
ol,
Expand All @@ -391,29 +372,13 @@
margin: 0 0 0 $indent-amount;
}

/**
* Address paddings set differently in IE 6/7.
*/

menu,
ol,
ul {
padding: 0 0 0 $indent-amount;
}
}

@if support-for(ie, 7) {
/**
* Correct list images handled incorrectly in IE 7.
*/

nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
}

/**
* Add the correct margin in IE 8.
*/
Expand All @@ -433,7 +398,7 @@
overflow: visible; /* 2 */
}

@if $normalize-vertical-rhythm or support-for(ie, 7) {
@if $normalize-vertical-rhythm {
/**
* Set 1 unit of vertical rhythm on the top and bottom margin.
*/
Expand All @@ -445,7 +410,8 @@
}

pre {
@include _normalize-monospace();
font-family: monospace, monospace;
font-size: 1em;
}
}

Expand Down Expand Up @@ -473,21 +439,9 @@
* on when it has padding (and textfield appearance).
*/

@if support-for(ie, 7) {
/**
* Correct margin displayed oddly in IE 6/7.
*/

form {
margin: 0;
}
}

/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
* 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
* 4. Improve appearance and consistency with IE 6/7.
*/

button,
Expand All @@ -497,10 +451,6 @@
textarea {
font: inherit; /* 1 */
margin: 0; /* 2 */
@if support-for(ie, 7) {
*font-family: $base-font-family; /* 3 */
*vertical-align: middle; /* 4 */
}
}

/**
Expand Down Expand Up @@ -563,27 +513,17 @@

input {
overflow: visible;
@if support-for(firefox, 29) {
// Firefox sets `line-height` using `!important` in the UA stylesheet.
line-height: normal;
}
}

/**
* 1. Add the correct box sizing in IE <11.
* 2. Remove the padding in IE <11.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/

[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
@if support-for(ie, 7) {
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
}

/**
Expand Down Expand Up @@ -648,7 +588,6 @@
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
* 4. Correct alignment displayed oddly in IE 6/7.
*/

legend {
Expand All @@ -658,9 +597,6 @@
white-space: normal; /* 1 */
color: inherit; /* 2 */
padding: 0; /* 3 */
@if support-for(ie, 7) {
*margin-left: -7px; /* 4 */
}
}

/**
Expand Down
13 changes: 0 additions & 13 deletions sass/normalize/_vertical-rhythm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
@if unit($value) != 'px' {
@error "normalize-font-size() only supports px inputs. The typey library is better.";
}
// px fallback for IE 8 and earlier. Note: IE 9/10 don't understand rem
// in font shorthand, but font-size longhand is fine.
@if $base-unit == rem and support-for(ie, 8) {
font-size: $value;
}
font-size: normalize-rhythm($value, $relative-to);
}

Expand All @@ -43,19 +38,11 @@
}

$normalized-values: ();
$px-fallback: ();

@each $value in $value-list {
$px-value: $value;
@if unitless($value) and $value != 0 {
$value: $value * normalize-rhythm($base-line-height, $relative-to);
$px-value: $px-value * normalize-rhythm($base-line-height, $relative-to, px);
}
$normalized-values: append($normalized-values, $value, $sep);
$px-fallback: append($px-fallback, $px-value, $sep);
}
@if $base-unit == rem and support-for(ie, 8) {
#{$property}: $px-fallback;
}
#{$property}: $normalized-values;
}
Expand Down
5 changes: 0 additions & 5 deletions test/fixtures/import-now/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ pre {
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
* 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
* 4. Improve appearance and consistency with IE 6/7.
*/
button,
input,
Expand Down Expand Up @@ -304,8 +302,6 @@ input {
/**
* 1. Add the correct box sizing in IE <11.
* 2. Remove the padding in IE <11.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
[type="checkbox"],
[type="radio"] {
Expand Down Expand Up @@ -366,7 +362,6 @@ fieldset {
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
* 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
box-sizing: border-box;
Expand Down
5 changes: 0 additions & 5 deletions test/fixtures/normalize/exclude-multiple/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ sup {
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
* 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
* 4. Improve appearance and consistency with IE 6/7.
*/
button,
input,
Expand Down Expand Up @@ -266,8 +264,6 @@ input {
/**
* 1. Add the correct box sizing in IE <11.
* 2. Remove the padding in IE <11.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
[type="checkbox"],
[type="radio"] {
Expand Down Expand Up @@ -328,7 +324,6 @@ fieldset {
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
* 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
box-sizing: border-box;
Expand Down
5 changes: 0 additions & 5 deletions test/fixtures/normalize/exclude-string/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ pre {
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
* 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
* 4. Improve appearance and consistency with IE 6/7.
*/
button,
input,
Expand Down Expand Up @@ -304,8 +302,6 @@ input {
/**
* 1. Add the correct box sizing in IE <11.
* 2. Remove the padding in IE <11.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
[type="checkbox"],
[type="radio"] {
Expand Down Expand Up @@ -366,7 +362,6 @@ fieldset {
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
* 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
box-sizing: border-box;
Expand Down
Loading

0 comments on commit c6ce01a

Please sign in to comment.