Permalink
Browse files

Removing need for transitions, lets IE10 through the door

  • Loading branch information...
Jake Archibald
Jake Archibald committed Jul 25, 2011
1 parent ffdbfc2 commit 6edb6f099479c20401545668579bac2d020cd7d2
@@ -1,4 +1,4 @@
#!/bin/bash
ver=3
cat www/assets/$ver/script/{jquery-1.6.2,jquery.transition,jquery.fileClickjack,intro,MicroEvent,Rect,ImgInput,SpriteCanvas,SpriteCanvasView,CssOutput,Toolbar,pageLayout,FeatureTest,featureTests,base}.js | bin/uglify/bin/uglifyjs --unsafe -o www/assets/$ver/script/mainmin.js
cat www/assets/$ver/script/{jquery-1.6.2,jquery.easing,jquery.transition,jquery.fileClickjack,intro,MicroEvent,Rect,ImgInput,SpriteCanvas,SpriteCanvasView,CssOutput,Toolbar,pageLayout,FeatureTest,featureTests,base}.js | bin/uglify/bin/uglifyjs --unsafe -o www/assets/$ver/script/mainmin.js
cat www/assets/$ver/style/base.css | java -jar bin/yuicompressor-2.4.5.jar --type css -o www/assets/$ver/style/mainmin.css
@@ -270,9 +270,14 @@
};
SpriteCanvasViewProto.setBg = function(color) {
this._$bgElm.transition({ 'background-color': color }, {
duration: 500
});
if ( $.support.transition ) {
this._$bgElm.transition({ 'background-color': color }, {
duration: 500
});
}
else {
this._$bgElm.css({ 'background-color': color });
}
this._highlight.setHighVisOnDark( color === '#000' );
};
@@ -51,9 +51,16 @@ spriteCow.Toolbar = (function() {
});
if (severe) {
$feedback.css('font-weight', 'bold').transition({ color: 'red' }, {
duration: 3000
});
$feedback.css('font-weight', 'bold')
if ($.support.transition) {
$feedback.transition({ color: 'red' }, {
duration: 3000
});
}
else {
$feedback.css('color', 'red');
}
}
else {
$feedback.animate({
@@ -17,7 +17,6 @@ spriteCow.featureTests = (function(document) {
featureTests.addResult( canvas(), '<canvas> element' );
featureTests.addResult( fileApi(), 'File & FileReader' );
featureTests.addResult( w3EventListeners(), 'addEventListener on elements' );
featureTests.addResult( $.support.transition, 'CSS3 transitions' );
if ($.browser.opera) { // I feel dirty, need these for some CSS tweaks
docElm.className += ' opera';
@@ -0,0 +1,8 @@
$.extend( $.easing, {
easeInQuad: function ( x, t, b, c, d ) {
return c * ( t /= d ) * t + b;
},
easeOutQuad: function ( x, t, b, c, d ) {
return -c * ( t /= d ) * ( t - 2 ) + b;
}
});
@@ -38,7 +38,7 @@
transitionend = 'transitionend webkitTransitionEnd oTransitionEnd',
getCssPropName = (function() {
var style = $testElm[0].style,
prefixes = ['Webkit', 'O', 'Ie', 'Moz'],
prefixes = ['Webkit', 'O', 'ms', 'Moz'],
cache = {};
return function(propertyName) {
@@ -45,7 +45,7 @@ spriteCow.pageLayout = (function() {
targets: [
[$container, { width: '100%' }],
[$header, { height: $header.height() }],
[$headerH1, { transform: $headerH1.vendorCss('transform') }],
[$headerH1, $.support.transition ? { transform: $headerH1.vendorCss('transform') } : {}],
[$cssOutput, {
height: $cssOutput.height(),
'padding-top': $cssOutput.css('padding-top'),
@@ -61,12 +61,14 @@ <h1>Sorry, it isn't working out between us</h1>
<p>
It's not you, I just can't get along with your browser.
Maybe if things change in the future... maybe if you bring a newish
version of <a href="http://www.google.com/chrome/">Chrome</a> or
<a href="http://www.mozilla.com/en-US/firefox/new/">Firefox</a>
version of <a href="http://www.google.com/chrome/">Chrome</a>,
<a href="http://www.mozilla.com/en-US/firefox/new/">Firefox</a> or
<a href="http://www.opera.com/">Opera</a>
to the party... not promising anything, but give me a call.
</p>
</div>
<script src="assets/3/script/jquery-1.6.2.js"></script>
<script src="assets/3/script/jquery.easing.js"></script>
<script src="assets/3/script/jquery.transition.js"></script>
<script src="assets/3/script/jquery.fileClickjack.js"></script>
<script src="assets/3/script/intro.js"></script>

0 comments on commit 6edb6f0

Please sign in to comment.