diff options
author | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-10-18 10:18:30 +0300 |
---|---|---|
committer | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-10-18 10:18:30 +0300 |
commit | 1f724e751f3250e58bf7990b88d403bf94b5ab69 (patch) | |
tree | e19c7e612b1f04ab3c1973fa83e0fcf5c4217458 | |
parent | 507ea1d6689ad358f781dc2f6777c1b6c11954be (diff) |
Drop support for IE6-7 and Firefox 29 in ruby-sass-compass fork. #89
-rw-r--r-- | fork-versions/ruby-sass-compass/_normalize.scss | 76 | ||||
-rw-r--r-- | fork-versions/ruby-sass-compass/_variables.scss | 13 | ||||
-rw-r--r-- | test/fixtures/compass/_support.scss | 36 | ||||
-rw-r--r-- | test/fixtures/fork-versions/ruby-sass-compass/output.css | 119 |
4 files changed, 13 insertions, 231 deletions
diff --git a/fork-versions/ruby-sass-compass/_normalize.scss b/fork-versions/ruby-sass-compass/_normalize.scss index 25beb33..bb0195c 100644 --- a/fork-versions/ruby-sass-compass/_normalize.scss +++ b/fork-versions/ruby-sass-compass/_normalize.scss @@ -3,7 +3,6 @@ @import "variables"; // After the default variables are set, import the required Compass partials. // Feel free to move these lines to your own initialization partial. -@import "compass/support"; @import "compass/css3/box-sizing"; @import "compass/typography/vertical_rhythm"; @@ -21,11 +20,11 @@ $normalize-vertical-rhythm: true !global; } -@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") { +@if $normalize-vertical-rhythm { /** * Establish a vertical rhythm unit using $base-font-size, $base-line-height, - * and $rhythm-unit variables. Also, correct text resizing oddly in IE 6/7 when - * body `font-size` is set using `em` units. + * and $rhythm-unit variables. Also, correct old browser bug that prevented + * accessible resizing of text when root font-size is set with px or em. */ @include establish-baseline(); @@ -85,10 +84,6 @@ canvas, progress, video { display: inline-block; - @if support-legacy-browser(ie, "7") { - *display: inline; - *zoom: 1; - } } /** @@ -183,9 +178,6 @@ code, kbd, samp { font-family: monospace, monospace; /* 1 */ - @if support-legacy-browser(ie, "6") { - _font-family: 'courier new', monospace; - } font-size: 1em; /* 2 */ } @@ -204,7 +196,7 @@ dfn { h1 { /* Set the font-size and line-height while keeping a proper vertical rhythm. */ - @if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") { + @if $normalize-vertical-rhythm { @include adjust-font-size-to( $h1-font-size ); } @else { @@ -216,7 +208,7 @@ h1 { @include trailer(1, $h1-font-size); } -@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") { +@if $normalize-vertical-rhythm { h2 { @include adjust-font-size-to( $h2-font-size ); @include leader(1, $h2-font-size); @@ -295,10 +287,6 @@ sup { img { border-style: none; - @if support-legacy-browser(ie, "7") { - /* Improve image quality when scaled in IE 7. */ - -ms-interpolation-mode: bicubic; - } } /** @@ -312,7 +300,7 @@ svg:not(:root) { /* Grouping content ========================================================================== */ -@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") { +@if $normalize-vertical-rhythm { /** * Set 1 unit of vertical rhythm on the top and bottom margin. */ @@ -321,10 +309,6 @@ svg:not(:root) { @include output-rhythm(margin, rhythm(1) $indent-amount); } - /** - * Address margins set differently in IE 6/7. - */ - dl, menu, ol, @@ -350,10 +334,6 @@ svg:not(:root) { margin: 0 0 0 $indent-amount; } - /** - * Address paddings set differently in IE 6/7. - */ - menu, ol, ul { @@ -361,18 +341,6 @@ svg:not(:root) { } } -@if support-legacy-browser(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. */ @@ -392,7 +360,7 @@ hr { overflow: visible; /* 2 */ } -@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") { +@if $normalize-vertical-rhythm { /** * Set 1 unit of vertical rhythm on the top and bottom margin. */ @@ -430,21 +398,9 @@ pre { * on when it has padding (and textfield appearance). */ -@if support-legacy-browser(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, @@ -454,10 +410,6 @@ select, textarea { font: inherit; /* 1 */ margin: 0; /* 2 */ - @if support-legacy-browser(ie, "7") { - *font-family: $base-font-family; /* 3 */ - *vertical-align: middle; /* 4 */ - } } /** @@ -520,27 +472,17 @@ button, input { overflow: visible; - @if support-legacy-browser(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"] { @include box-sizing(border-box); /* 1 */ padding: 0; /* 2 */ - @if support-legacy-browser(ie, "7") { - *height: 13px; /* 3 */ - *width: 13px; /* 3 */ - } } /** @@ -609,7 +551,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 { @@ -619,9 +560,6 @@ legend { white-space: normal; /* 1 */ color: inherit; /* 2 */ padding: 0; /* 3 */ - @if support-legacy-browser(ie, "7") { - *margin-left: -7px; /* 4 */ - } } /** diff --git a/fork-versions/ruby-sass-compass/_variables.scss b/fork-versions/ruby-sass-compass/_variables.scss index 6254b3f..cebd9e0 100644 --- a/fork-versions/ruby-sass-compass/_variables.scss +++ b/fork-versions/ruby-sass-compass/_variables.scss @@ -17,19 +17,6 @@ // Supported values: px, em, rem. $rhythm-unit: 'em' !default; - // Note: This project also makes use of variables from Compass' support - // module. Documentation for this can be found on the wiki at: - // http://compass-style.org/reference/compass/support/ - $critical-usage-threshold: 0.01 !default; - - $browser-minimum-versions: ( - 'chrome': null, - 'firefox': null, - 'ie': null, - 'safari': null, - 'opera': null - ) !default; - // The default font family. $base-font-family: sans-serif !default; diff --git a/test/fixtures/compass/_support.scss b/test/fixtures/compass/_support.scss deleted file mode 100644 index e74f946..0000000 --- a/test/fixtures/compass/_support.scss +++ /dev/null @@ -1,36 +0,0 @@ -// Specify the minimum version numbers of supported browsers. -// @see http://next.zengrids.com/reference/grids/#browser-minimum-versions -$browser-minimum-versions: ( - 'chrome': null, - 'firefox': null, - 'ie': null, - 'safari': null, - 'opera': null -) !default; - -$critical-usage-threshold: 0.01 !default; - -@if $critical-usage-threshold == 0.01 { - $browser-minimum-versions: ( - 'chrome': '9', - 'firefox': '28', - 'ie': '7', - 'safari': '5', - 'opera': null - ); -} - -// -// A stripped-down version of Compass' support-legacy-browser(). -// -@function support-legacy-browser($browser, $min-version) { - // Check against declared minimums. - $min-required-version: map-get($browser-minimum-versions, $browser); - - @return ($min-required-version and (normalize-str-to-int($min-version) >= normalize-str-to-int($min-required-version))); -} - -@function normalize-str-to-int($string) { - $integers: ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100"); - @return index($integers, $string); -} diff --git a/test/fixtures/fork-versions/ruby-sass-compass/output.css b/test/fixtures/fork-versions/ruby-sass-compass/output.css index bbe671a..9ae6053 100644 --- a/test/fixtures/fork-versions/ruby-sass-compass/output.css +++ b/test/fixtures/fork-versions/ruby-sass-compass/output.css @@ -1,14 +1,5 @@ /*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */ /** - * Establish a vertical rhythm unit using $base-font-size, $base-line-height, - * and $rhythm-unit variables. Also, correct text resizing oddly in IE 6/7 when - * body `font-size` is set using `em` units. - */ -html { - font-size: 100%; - line-height: 1.5em; } - -/** * 1. Change the default font family in all browsers (opinionated). * 2. Prevent adjustments of font size after orientation changes in IE and iOS. */ @@ -54,9 +45,7 @@ audio, canvas, progress, video { - display: inline-block; - *display: inline; - *zoom: 1; } + display: inline-block; } /** * Add the correct display and remove excess height in iOS 4-7. @@ -153,41 +142,10 @@ dfn { h1 { /* Set the font-size and line-height while keeping a proper vertical rhythm. */ font-size: 2em; - line-height: 1.5em; /* Set 1 unit of vertical rhythm on the top and bottom margins. */ margin-top: 0.75em; margin-bottom: 0.75em; } -h2 { - font-size: 1.5em; - line-height: 2em; - margin-top: 1em; - margin-bottom: 1em; } - -h3 { - font-size: 1.17em; - line-height: 1.28205em; - margin-top: 1.28205em; - margin-bottom: 1.28205em; } - -h4 { - font-size: 1em; - line-height: 1.5em; - margin-top: 1.5em; - margin-bottom: 1.5em; } - -h5 { - font-size: 0.83em; - line-height: 1.80723em; - margin-top: 1.80723em; - margin-bottom: 1.80723em; } - -h6 { - font-size: 0.67em; - line-height: 2.23881em; - margin-top: 2.23881em; - margin-bottom: 2.23881em; } - /** * Add the correct background and color in IE <10. */ @@ -224,9 +182,7 @@ sup { * Remove the border on images inside links in IE <11. */ img { - border-style: none; - /* Improve image quality when scaled in IE 7. */ - -ms-interpolation-mode: bicubic; } + border-style: none; } /** * Hide the overflow in IE. @@ -237,40 +193,6 @@ svg:not(:root) { /* Grouping content ========================================================================== */ /** - * Set 1 unit of vertical rhythm on the top and bottom margin. - */ -blockquote { - margin: 1.5em 40px; } - -/** - * Address margins set differently in IE 6/7. - */ -dl, -menu, -ol, -ul { - margin: 1.5em 0; } - -dd { - margin: 0 0 0 40px; } - -/** - * Address paddings set differently in IE 6/7. - */ -menu, -ol, -ul { - padding: 0 0 0 40px; } - -/** - * 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. */ figure { @@ -290,13 +212,6 @@ hr { overflow: visible; /* 2 */ } -/** - * Set 1 unit of vertical rhythm on the top and bottom margin. - */ -p, -pre { - margin: 1.5em 0; } - /* Forms ========================================================================== */ /** @@ -319,16 +234,8 @@ pre { * on when it has padding (and textfield appearance). */ /** - * 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, input, @@ -338,11 +245,7 @@ textarea { font: inherit; /* 1 */ margin: 0; - /* 2 */ - *font-family: sans-serif; - /* 3 */ - *vertical-align: middle; - /* 4 */ } + /* 2 */ } /** * Show the overflow in IE. @@ -397,14 +300,11 @@ button, * Show the overflow in Edge. */ input { - overflow: visible; - line-height: normal; } + overflow: visible; } /** * 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"] { @@ -413,11 +313,7 @@ input { box-sizing: border-box; /* 1 */ padding: 0; - /* 2 */ - *height: 13px; - /* 3 */ - *width: 13px; - /* 3 */ } + /* 2 */ } /** * Correct the cursor style of increment and decrement buttons in Chrome. @@ -483,7 +379,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; @@ -497,9 +392,7 @@ legend { color: inherit; /* 2 */ padding: 0; - /* 3 */ - *margin-left: -7px; - /* 4 */ } + /* 3 */ } /** * Restore the font weight unset by a previous rule. |