From d0c327d44f898990c2de75d4d636cfe60fada26c Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Tue, 16 Jun 2015 08:42:29 +0100 Subject: [PATCH] Fixes #603 - IE suffix hack should be left on by default. It works up to IE9 and we have IE9 mode on by default! --- History.md | 5 +++++ lib/utils/compatibility.js | 2 +- test/fixtures/bootstrap-min.css | 6 +++--- test/integration-test.js | 2 +- test/selectors/optimizers/simple-test.js | 2 +- test/utils/compatibility-test.js | 8 ++++---- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/History.md b/History.md index 1035cba1..58d2a0de 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,8 @@ +[3.3.3 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.3.2...3.3) +================== + +* Fixed issue [#603](https://github.com/jakubpawlowicz/clean-css/issues/603) - IE suffix hack defaults to on. + [3.3.2 / 2015-06-14](https://github.com/jakubpawlowicz/clean-css/compare/v3.3.1...v3.3.2) ================== diff --git a/lib/utils/compatibility.js b/lib/utils/compatibility.js index a1909641..2594d013 100644 --- a/lib/utils/compatibility.js +++ b/lib/utils/compatibility.js @@ -11,7 +11,7 @@ var DEFAULTS = { backgroundSizeMerging: false, // background-size to shorthand colors: true, // any kind of color transformations, like `#ff00ff` to `#f0f` or `#fff` into `red` iePrefixHack: false, // underscore / asterisk prefix hacks on IE - ieSuffixHack: false, // \9 suffix hacks on IE + ieSuffixHack: true, // \9 suffix hacks on IE6-9 merging: true, // merging properties into one spaceAfterClosingBrace: true, // 'url() no-repeat' to 'url()no-repeat' urlQuotes: false, // whether to wrap content of `url()` into quotes or not diff --git a/test/fixtures/bootstrap-min.css b/test/fixtures/bootstrap-min.css index 0f2334fa..08ccad8b 100644 --- a/test/fixtures/bootstrap-min.css +++ b/test/fixtures/bootstrap-min.css @@ -663,7 +663,7 @@ fieldset{min-width:0;margin:0} legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5} label{display:inline-block;max-width:100%;margin-bottom:5px} input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none} -input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal} +input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal} .form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555} input[type=file]{display:block} input[type=range]{display:block;width:100%} @@ -686,7 +686,7 @@ textarea.form-control{height:auto} .form-group{margin-bottom:15px} .checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px} .checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer} -.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px} +.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px} .checkbox+.checkbox,.radio+.radio{margin-top:-5px} .checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer} .checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px} @@ -1346,7 +1346,7 @@ button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;bor .carousel-control .icon-prev:before{content:'\2039'} .carousel-control .icon-next:before{content:'\203a'} .carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none} -.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:transparent;border:1px solid #fff;border-radius:10px} +.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:transparent;border:1px solid #fff;border-radius:10px} .carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff} .carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)} .carousel-caption .btn,.text-hide{text-shadow:none} diff --git a/test/integration-test.js b/test/integration-test.js index e6853113..02691ead 100644 --- a/test/integration-test.js +++ b/test/integration-test.js @@ -1260,7 +1260,7 @@ path")}', ], 'backslash': [ 'a{color:#fff\\9}', - '' + 'a{color:#fff\\9}' ] }), 'animations': cssContext({ diff --git a/test/selectors/optimizers/simple-test.js b/test/selectors/optimizers/simple-test.js index f1570c7e..a992eefc 100644 --- a/test/selectors/optimizers/simple-test.js +++ b/test/selectors/optimizers/simple-test.js @@ -360,7 +360,7 @@ vows.describe(SimpleOptimizer) ], 'backslash': [ 'a{width:100px\\9}', - null + [['width', '100px']] ] }) ) diff --git a/test/utils/compatibility-test.js b/test/utils/compatibility-test.js index 1be90772..1a92662a 100644 --- a/test/utils/compatibility-test.js +++ b/test/utils/compatibility-test.js @@ -15,7 +15,7 @@ vows.describe(Compatibility) assert.isFalse(options.properties.backgroundOriginMerging); assert.isFalse(options.properties.backgroundSizeMerging); assert.isFalse(options.properties.iePrefixHack); - assert.isFalse(options.properties.ieSuffixHack); + assert.isTrue(options.properties.ieSuffixHack); assert.isTrue(options.properties.merging); assert.isTrue(options.properties.spaceAfterClosingBrace); assert.isFalse(options.properties.urlQuotes); @@ -51,7 +51,7 @@ vows.describe(Compatibility) assert.isFalse(options.properties.backgroundSizeMerging); assert.isTrue(options.properties.colors); assert.isFalse(options.properties.iePrefixHack); - assert.isFalse(options.properties.ieSuffixHack); + assert.isTrue(options.properties.ieSuffixHack); assert.isTrue(options.properties.merging); assert.isTrue(options.properties.spaceAfterClosingBrace); assert.isTrue(options.properties.zeroUnits); @@ -174,7 +174,7 @@ vows.describe(Compatibility) assert.isFalse(options.properties.backgroundOriginMerging); assert.isFalse(options.properties.backgroundSizeMerging); assert.isTrue(options.properties.iePrefixHack); - assert.isFalse(options.properties.ieSuffixHack); + assert.isTrue(options.properties.ieSuffixHack); assert.isTrue(options.properties.merging); assert.isTrue(options.properties.spaceAfterClosingBrace); assert.isFalse(options.properties.urlQuotes); @@ -202,7 +202,7 @@ vows.describe(Compatibility) assert.isFalse(options.properties.backgroundOriginMerging); assert.isFalse(options.properties.backgroundSizeMerging); assert.isTrue(options.properties.iePrefixHack); - assert.isFalse(options.properties.ieSuffixHack); + assert.isTrue(options.properties.ieSuffixHack); assert.isTrue(options.properties.merging); assert.isTrue(options.properties.spaceAfterClosingBrace); assert.isFalse(options.properties.urlQuotes); -- 2.34.1