Skip to content

Commit 5a00fea

Browse files
committed
Fix #22, feature detect instead
1 parent 86380b1 commit 5a00fea

9 files changed

+38
-29
lines changed

README.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If you don't want the script to automatically load and parse then you could set
4848

4949
## Tests
5050

51-
This script has been tested in <code>IE 9</code>, <code>FF</code>, <code>Chrome</code>, <code>Safari</code>, <code>Opera</code> on windows
51+
This script has been tested in <code>IE 9-10</code>, <code>FF</code>, <code>Webkit</code>
5252

5353
<http://jsfiddle.net/UmquE/>
5454

@@ -74,6 +74,10 @@ I appreciate all feedback, thanks! If you would like to donate you can send to t
7474

7575
## Change log ##
7676

77+
2013-02-23 - **v3.3**
78+
79+
* Fix for jQuery 1.9 ([codler](https://github.com/codler) [#22](https://github.com/codler/jQuery-Css3-Finalize/issues/22))
80+
7781
2012-11-30 - **v3.2**
7882

7983
* Fix detect shorthand properties in webkit. ([codler](https://github.com/codler) [#20](https://github.com/codler/jQuery-Css3-Finalize/issues/20))

build/options.bkp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jquery:1.7.1
1+
jquery:1.8.3

build/options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jquery:1.8.3
1+
jquery:1.9.1

build/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
js:jquery:1.8.3:jquery-1.8.3.min.js
2-
js:css3finalize:3.1:jquery.css3finalize-v3.x.min.js
1+
js:jquery:1.9.1:jquery-1.9.1.min.js
2+
js:css3finalize:3.2:jquery.css3finalize-v3.x.min.js
33
rar:kirby:0.7:kirby.rar
44
php:smush:1.0:smush.php
55
php:fetch_url:1.1:fetch_url.class.php

jquery.css3finalize.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! CSS3 Finalize - v3.2 - 2012-11-30 - Automatically add vendor prefixes.
1+
/*! CSS3 Finalize - v3.3 - 2013-02-23 - Automatically add vendor prefixes.
22
* https://github.com/codler/jQuery-Css3-Finalize
3-
* Copyright (c) 2012 Han Lin Yap http://yap.nu; http://creativecommons.org/licenses/by-sa/3.0/ */
3+
* Copyright (c) 2013 Han Lin Yap http://yap.nu; http://creativecommons.org/licenses/by-sa/3.0/ */
44
(function ($) {
55
// Prevent to read twice
66
if ($.cssFinalize) {
@@ -27,7 +27,8 @@
2727

2828
$.cssFinalize = function(options) {
2929
var div = document.createElement('div');
30-
30+
div.style.cssText = 'background-image:linear-gradient(#9f9, white);';
31+
3132
options = $.extend({}, $.cssFinalizeSetup, options);
3233

3334
var deCamelCase = function(str) {
@@ -67,7 +68,7 @@
6768
}
6869

6970
// IE9 do have transform but the code above didnt detect it so I added manually
70-
if (currentPrefix == 'ms' && $.browser.version == 9) {
71+
if (currentPrefix == 'ms' && supportRules.indexOf('transform') === -1) {
7172
supportRules.push('transform');
7273
supportRules.push('transform-origin');
7374
} else if (currentPrefix == 'webkit') {
@@ -344,8 +345,8 @@
344345
}
345346

346347
if (property == 'display') {
347-
// flex
348-
if (currentPrefix == 'ms' && $.browser.version == 10) {
348+
// flex - Convert newer standard to IE compability
349+
if (currentPrefix == 'ms' && 'msFlexWrap' in div.style) {
349350
if (value.indexOf('flex') === 0) {
350351
return '-ms-flexbox';
351352
}
@@ -356,10 +357,10 @@
356357

357358
if (value.indexOf('grid') === 0 ||
358359
value.indexOf('inline-grid') === 0 ||
359-
// Old
360+
// Old - IE10 - http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/
360361
value.indexOf('flexbox') === 0 ||
361362
value.indexOf('inline-flexbox') === 0 ||
362-
// Editor’s Draft, 13th August 2012 - http://dev.w3.org/csswg/css3-flexbox/
363+
// W3C Candidate Recommendation, 18 September 2012 - http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/
363364
value.indexOf('flex') === 0 ||
364365
value.indexOf('inline-flex') === 0
365366
) {
@@ -372,7 +373,7 @@
372373
if (value.indexOf('linear-gradient') === 0) {
373374
// Only for IE9 - border-radius + gradient bug
374375
// http://stackoverflow.com/questions/4692686/ie9-border-radius-and-background-gradient-bleeding
375-
if (currentPrefix == 'ms' && $.browser.version == 9) {
376+
if (currentPrefix == 'ms' && div.style.backgroundImage.indexOf('gradient') === -1) {
376377
// Example
377378
// value = linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, .5))
378379
var da = value.replace(/^linear-gradient\s?\(\s?(.*?)\s?\)$/, '$1'),

jquery.css3finalize.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/libs/jquery-1.8.3.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/libs/jquery-1.9.1.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)