This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added back the "slidefade" transition, which is usually preferable to…
… "slide", except in cases where a page is short enough that a simultaneous transition sequence won't jump much (which is needed for a regular slide transition). As part of this addition, the keyframes for slidein and slideout are now in their own files, as they are dependencies for these slide transitions
- Loading branch information
scottjehl
committed
Mar 27, 2012
1 parent
ee6d656
commit 72bd778
Showing
7 changed files
with
103 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* slidefade transition - depends on fadein and slidein.keyframes */ | ||
.slidefade.out { | ||
-webkit-transform: translateX(-100%); | ||
-webkit-animation-name: slideouttoleft; | ||
-moz-transform: translateX(-100%); | ||
-moz-animation-name: slideouttoleft; | ||
-webkit-animation-duration: 225ms; | ||
-moz-animation-duration: 225ms; | ||
} | ||
|
||
.slidefade.in { | ||
-webkit-transform: translateX(0); | ||
-webkit-animation-name: fadein; | ||
-moz-transform: translateX(0); | ||
-moz-animation-name: fadein; | ||
-webkit-animation-duration: 200ms; | ||
-moz-animation-duration: 200ms; | ||
} | ||
|
||
.slidefade.out.reverse { | ||
-webkit-transform: translateX(100%); | ||
-webkit-animation-name: slideouttoright; | ||
-moz-transform: translateX(100%); | ||
-moz-animation-name: slideouttoright; | ||
-webkit-animation-duration: 200ms; | ||
-moz-animation-duration: 200ms; | ||
} | ||
|
||
.slidefade.in.reverse { | ||
-webkit-transform: translateX(0); | ||
-webkit-animation-name: fadein; | ||
-moz-transform: translateX(0); | ||
-moz-animation-name: fadein; | ||
-webkit-animation-duration: 200ms; | ||
-moz-animation-duration: 200ms; | ||
} |
18 changes: 18 additions & 0 deletions
18
css/structure/jquery.mobile.transitions.slidein.keyframes.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* keyframes for slidein from sides */ | ||
@-webkit-keyframes slideinfromright { | ||
from { -webkit-transform: translateX(100%); } | ||
to { -webkit-transform: translateX(0); } | ||
} | ||
@-moz-keyframes slideinfromright { | ||
from { -webkit-transform: translateX(100%); } | ||
to { -webkit-transform: translateX(0); } | ||
} | ||
|
||
@-webkit-keyframes slideinfromleft { | ||
from { -webkit-transform: translateX(-100%); } | ||
to { -webkit-transform: translateX(0); } | ||
} | ||
@-moz-keyframes slideinfromleft { | ||
from { -webkit-transform: translateX(-100%); } | ||
to { -webkit-transform: translateX(0); } | ||
} |
18 changes: 18 additions & 0 deletions
18
css/structure/jquery.mobile.transitions.slideout.keyframes.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* keyframes for slideout to sides */ | ||
@-webkit-keyframes slideouttoleft { | ||
from { -webkit-transform: translateX(0); } | ||
to { -webkit-transform: translateX(-100%); } | ||
} | ||
@-moz-keyframes slideouttoleft { | ||
from { -moz-transform: translateX(0); } | ||
to { -moz-transform: translateX(-100%); } | ||
} | ||
|
||
@-webkit-keyframes slideouttoright { | ||
from { -webkit-transform: translateX(0); } | ||
to { -webkit-transform: translateX(100%); } | ||
} | ||
@-moz-keyframes slideouttoright { | ||
from { -moz-transform: translateX(0); } | ||
to { -moz-transform: translateX(100%); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* fallback transition for slidefade in non-3D supporting browsers (which tend to handle complex transitions poorly in general | ||
*/ | ||
|
||
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); | ||
//>>description: Handler and fallback transition for slide in non-3D supporting browsers | ||
//>>label: Slide handler and fallback transition | ||
//>>group: Transitions | ||
//>>css: ../css/structure/jquery.mobile.transition.slide.css | ||
|
||
define( [ "jquery", "./jquery.mobile.transition" ], function( $ ) { | ||
//>>excludeEnd("jqmBuildExclude"); | ||
(function( $, window, undefined ) { | ||
|
||
// Set the slide transition's fallback to "fade" | ||
$.mobile.transitionFallbacks.slidefade = "fade"; | ||
|
||
})( jQuery, this ); | ||
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); | ||
}); | ||
//>>excludeEnd("jqmBuildExclude"); |