diff --git a/css/structure/jquery.mobile.core.css b/css/structure/jquery.mobile.core.css index 957760df..6a94a822 100644 --- a/css/structure/jquery.mobile.core.css +++ b/css/structure/jquery.mobile.core.css @@ -42,9 +42,6 @@ div.ui-mobile-viewport { overflow-x: hidden; } /* some level of transform keeps elements from blinking out of visibility on iOS */ -webkit-transform: rotateY(0); } -.ui-page.ui-mobile-pre-transition { - display: block; -} .ui-mobile-touch-overflow.ui-native-fixed .ui-content .ui-listview { margin-top: 0; } @@ -63,13 +60,11 @@ div.ui-mobile-viewport { overflow-x: hidden; } } /* loading screen */ -.ui-loading .ui-mobile-viewport { overflow: hidden !important; } .ui-loading .ui-loader { display: block; } -.ui-loading .ui-page { overflow: hidden; } -.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; } -.ui-loader h1 { font-size: 15px; text-align: center; } -.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; } - +.ui-loader { background-color: #000; opacity: .18; display: none; z-index: 9999999; position: fixed; width: 46px; height: 46px; top: 50%; box-shadow: 0 1px 1px -1px #fff; margin-left: -18px; margin-top: -18px; left: 50%; padding: 1px; border:0; -webkit-border-radius: 36px; -moz-border-radius: 36px; border-radius: 36px; } +.ui-loader h1 { font-size: 0px; width: 0; height: 0; overflow: hidden; } +.ui-loader .ui-icon { display: block; margin: 0; width: 46px; height: 46px; background-color: transparent; } +.ui-loader-fakefix { position: absolute; } /*fouc*/ .ui-mobile-rendering > * { visibility: hidden; } diff --git a/css/structure/jquery.mobile.dialog.css b/css/structure/jquery.mobile.dialog.css index 8f27f44e..6de24927 100644 --- a/css/structure/jquery.mobile.dialog.css +++ b/css/structure/jquery.mobile.dialog.css @@ -1,5 +1,7 @@ .ui-dialog { width: 92.5%; max-width: 500px; margin: 10% auto 15px auto; padding: 0; } - +.ui-dialog-page { + background: none !important; /* this is to ensure that dialog theming does not apply (by default at least) on the page div */ +} .ui-dialog .ui-header { margin-top: 15%; } @@ -12,8 +14,11 @@ } .ui-dialog .ui-header, .ui-dialog .ui-footer { - padding: 0 15px; z-index: 10; + padding: 0; +} +.ui-dialog .ui-footer { + padding: 0 15px; } .ui-dialog .ui-content { padding: 15px; diff --git a/css/structure/jquery.mobile.transitions.css b/css/structure/jquery.mobile.transitions.css index 503baa32..7bccb841 100644 --- a/css/structure/jquery.mobile.transitions.css +++ b/css/structure/jquery.mobile.transitions.css @@ -1,159 +1,4 @@ -.spin { - -webkit-transform: rotate(360deg); - -webkit-animation-name: spin; - -webkit-animation-duration: 1s; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; -} -@-webkit-keyframes spin { - from {-webkit-transform: rotate(0deg);} - to {-webkit-transform: rotate(360deg);} -} - -/* Transitions from jQtouch (with small modifications): http://www.jqtouch.com/ -Built by David Kaneda and maintained by Jonathan Stark. -*/ -.in, .out { - -webkit-animation-timing-function: ease-in-out; - -webkit-animation-duration: 350ms; -} - - -.slide.out { - -webkit-transform: translateX(-100%); - -webkit-animation-name: slideouttoleft; -} - -.slide.in { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromright; -} - -.slide.out.reverse { - -webkit-transform: translateX(100%); - -webkit-animation-name: slideouttoright; -} - -.slide.in.reverse { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromleft; -} - -.slideup.out { - -webkit-animation-name: dontmove; - z-index: 0; -} - -.slideup.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfrombottom; - z-index: 10; -} - -.slideup.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.slideup.out.reverse { - -webkit-transform: translateY(100%); - z-index: 10; - -webkit-animation-name: slideouttobottom; -} - -.slidedown.out { - -webkit-animation-name: dontmove; - z-index: 0; -} - -.slidedown.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfromtop; - z-index: 10; -} - -.slidedown.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.slidedown.out.reverse { - -webkit-transform: translateY(-100%); - z-index: 10; - -webkit-animation-name: slideouttotop; -} - -@-webkit-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); } -} - -@-webkit-keyframes slideouttoleft { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(-100%); } -} - -@-webkit-keyframes slideouttoright { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(100%); } -} - -@-webkit-keyframes slideinfromtop { - from { -webkit-transform: translateY(-100%); } - to { -webkit-transform: translateY(0); } -} - -@-webkit-keyframes slideinfrombottom { - from { -webkit-transform: translateY(100%); } - to { -webkit-transform: translateY(0); } -} - -@-webkit-keyframes slideouttobottom { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(100%); } -} - -@-webkit-keyframes slideouttotop { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(-100%); } -} -@-webkit-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} - -@-webkit-keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} - -.fade.out { - z-index: 0; - -webkit-animation-name: fadeout; -} - -.fade.in { - opacity: 1; - z-index: 10; - -webkit-animation-name: fadein; -} - -/* The properties in this rule are only necessary for the 'flip' transition. - * We need specify the perspective to create a projection matrix. This will add - * some depth as the element flips. The depth number represents the distance of - * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate - * value. - */ -.viewport-flip { - -webkit-perspective: 1000; - position: absolute; -} - +/* Transitions originally inspired by those from jQtouch, nice work, folks */ .ui-mobile-viewport-transitioning, .ui-mobile-viewport-transitioning .ui-page { width: 100%; @@ -161,103 +6,16 @@ Built by David Kaneda and maintained by Jonathan Stark. overflow: hidden; } -.flip { - -webkit-animation-duration: .65s; - -webkit-backface-visibility:hidden; - -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ +.in { + -webkit-animation-timing-function: ease-out; + -webkit-animation-duration: 350ms; + -moz-animation-timing-function: ease-out; + -moz-animation-duration: 350ms; } -.flip.out { - -webkit-transform: rotateY(-180deg) scale(.8); - -webkit-animation-name: flipouttoleft; -} - -.flip.in { - -webkit-transform: rotateY(0) scale(1); - -webkit-animation-name: flipinfromleft; -} - -/* Shake it all about */ - -.flip.out.reverse { - -webkit-transform: rotateY(180deg) scale(.8); - -webkit-animation-name: flipouttoright; -} - -.flip.in.reverse { - -webkit-transform: rotateY(0) scale(1); - -webkit-animation-name: flipinfromright; -} - -@-webkit-keyframes flipinfromright { - from { -webkit-transform: rotateY(-180deg) scale(.8); } - to { -webkit-transform: rotateY(0) scale(1); } -} - -@-webkit-keyframes flipinfromleft { - from { -webkit-transform: rotateY(180deg) scale(.8); } - to { -webkit-transform: rotateY(0) scale(1); } -} - -@-webkit-keyframes flipouttoleft { - from { -webkit-transform: rotateY(0) scale(1); } - to { -webkit-transform: rotateY(-180deg) scale(.8); } -} - -@-webkit-keyframes flipouttoright { - from { -webkit-transform: rotateY(0) scale(1); } - to { -webkit-transform: rotateY(180deg) scale(.8); } -} - - -/* Hackish, but reliable. */ - -@-webkit-keyframes dontmove { - from { opacity: 1; } - to { opacity: 1; } -} - -.pop { - -webkit-transform-origin: 50% 50%; -} - -.pop.in { - -webkit-transform: scale(1); - opacity: 1; - -webkit-animation-name: popin; - z-index: 10; -} - -.pop.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.pop.out.reverse { - -webkit-transform: scale(.2); - opacity: 0; - -webkit-animation-name: popout; - z-index: 10; -} - -@-webkit-keyframes popin { - from { - -webkit-transform: scale(.2); - opacity: 0; - } - to { - -webkit-transform: scale(1); - opacity: 1; - } -} - -@-webkit-keyframes popout { - from { - -webkit-transform: scale(1); - opacity: 1; - } - to { - -webkit-transform: scale(.2); - opacity: 0; - } +.out { + -webkit-animation-timing-function: ease-in; + -webkit-animation-duration: 225ms; + -moz-animation-timing-function: ease-in; + -moz-animation-duration: 225; } \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.fade.css b/css/structure/jquery.mobile.transitions.fade.css new file mode 100644 index 00000000..a22c76a5 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.fade.css @@ -0,0 +1,37 @@ +@-webkit-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-moz-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-webkit-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} + +@-moz-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} + +.fade.out { + z-index: 0; + opacity: 0; + -webkit-animation-duration: 150ms; + -webkit-animation-name: fadeout; + -moz-animation-duration: 150ms; + -moz-animation-name: fadeout; +} + +.fade.in { + opacity: 1; + z-index: 10; + -webkit-animation-duration: 300ms; + -webkit-animation-name: fadein; + -moz-animation-duration: 300ms; + -moz-animation-name: fadein; +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.flip.css b/css/structure/jquery.mobile.transitions.flip.css new file mode 100644 index 00000000..645be9d5 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.flip.css @@ -0,0 +1,79 @@ +/* The properties in this rule are only necessary for the 'flip' transition. + * We need specify the perspective to create a projection matrix. This will add + * some depth as the element flips. The depth number represents the distance of + * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate + * value. + */ + +.viewport-flip { + -webkit-perspective: 1000; + -moz-perspective: 1000; + position: absolute; +} +.flip { + -webkit-backface-visibility:hidden; + -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -moz-backface-visibility:hidden; + -moz-transform:translateX(0); +} + +.flip.out { + -webkit-transform: rotateY(-90deg) scale(.9); + -webkit-animation-name: flipouttoleft; + -webkit-animation-duration: 225ms; + -moz-transform: rotateY(-90deg) scale(.9); + -moz-animation-name: flipouttoleft; + -moz-animation-duration: 225ms; +} + +.flip.in { + -webkit-animation-name: flipintoright; + -webkit-animation-duration: 350ms; + -moz-animation-name: flipintoright; + -moz-animation-duration: 350ms; +} + +.flip.out.reverse { + -webkit-transform: rotateY(90deg) scale(.9); + -webkit-animation-name: flipouttoright; + -moz-transform: rotateY(90deg) scale(.9); + -moz-animation-name: flipouttoright; +} + +.flip.in.reverse { + -webkit-animation-name: flipintoleft; + -moz-animation-name: flipintoleft; +} + +@-webkit-keyframes flipouttoleft { + from { -webkit-transform: rotateY(0); } + to { -webkit-transform: rotateY(-90deg) scale(.9); } +} +@-moz-keyframes flipouttoleft { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(-90deg) scale(.9); } +} +@-webkit-keyframes flipouttoright { + from { -webkit-transform: rotateY(0) ; } + to { -webkit-transform: rotateY(90deg) scale(.9); } +} +@-moz-keyframes flipouttoright { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(90deg) scale(.9); } +} +@-webkit-keyframes flipintoleft { + from { -webkit-transform: rotateY(-90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoleft { + from { -moz-transform: rotateY(-90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} +@-webkit-keyframes flipintoright { + from { -webkit-transform: rotateY(90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoright { + from { -moz-transform: rotateY(90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.flow.css b/css/structure/jquery.mobile.transitions.flow.css new file mode 100644 index 00000000..c30346ed --- /dev/null +++ b/css/structure/jquery.mobile.transitions.flow.css @@ -0,0 +1,88 @@ +/* flow transition */ +.flow { + -webkit-transform-origin: 50% 30%; + -moz-transform-origin: 50% 30%; + -webkit-box-shadow: 0 0 20px rgba(0,0,0,.4); + -moz-box-shadow: 0 0 20px rgba(0,0,0,.4); +} +.ui-dialog-page.flow { + -moz-transform-origin: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +.flow.out { + -webkit-transform: translateX(-100%) scale(.7); + -webkit-animation-name: flowouttoleft; + -webkit-animation-timing-function: ease; + -webkit-animation-duration: 500ms; + -moz-transform: translateX(-100%) scale(.7); + -moz-animation-name: flowouttoleft; + -moz-animation-timing-function: ease; + -moz-animation-duration: 500ms; +} + +.flow.in { + -webkit-transform: translateX(0) scale(1); + -webkit-animation-name: flowinfromright; + -webkit-animation-timing-function: ease; + -webkit-animation-duration: 400ms; + -moz-transform: translateX(0) scale(1); + -moz-animation-name: flowinfromright; + -moz-animation-timing-function: ease; + -moz-animation-duration: 400ms; +} + +.flow.out.reverse { + -webkit-transform: translateX(100%); + -webkit-animation-name: flowouttoright; + -moz-transform: translateX(100%); + -moz-animation-name: flowouttoright; +} + +.flow.in.reverse { + -webkit-animation-name: flowinfromleft; + -moz-animation-name: flowinfromleft; +} + +@-webkit-keyframes flowouttoleft { + 0% { -webkit-transform: translateX(0) scale(1); } + 60%, 70% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(-100%) scale(.7); } +} +@-moz-keyframes flowouttoleft { + 0% { -moz-transform: translateX(0) scale(1); } + 60%, 70% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(-100%) scale(.7); } +} + +@-webkit-keyframes flowouttoright { + 0% { -webkit-transform: translateX(0) scale(1); } + 60%, 70% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(100%) scale(.7); } +} +@-moz-keyframes flowouttoright { + 0% { -moz-transform: translateX(0) scale(1); } + 60%, 70% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(100%) scale(.7); } +} + +@-webkit-keyframes flowinfromleft { + 0% { -webkit-transform: translateX(-100%) scale(.7); } + 30%, 40% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(0) scale(1); } +} +@-moz-keyframes flowinfromleft { + 0% { -moz-transform: translateX(-100%) scale(.7); } + 30%, 40% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(0) scale(1); } +} +@-webkit-keyframes flowinfromright { + 0% { -webkit-transform: translateX(100%) scale(.7); } + 30%, 40% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(0) scale(1); } +} +@-moz-keyframes flowinfromright { + 0% { -moz-transform: translateX(100%) scale(.7); } + 30%, 40% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(0) scale(1); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.pop.css b/css/structure/jquery.mobile.transitions.pop.css new file mode 100644 index 00000000..15629f17 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.pop.css @@ -0,0 +1,78 @@ +.pop { + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; +} + +.pop.in { + -webkit-transform: scale(1); + -moz-transform: scale(1); + opacity: 1; + -webkit-animation-name: popin; + -moz-animation-name: popin; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.pop.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + opacity: 0; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.pop.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.pop.out.reverse { + -webkit-transform: scale(.8); + -moz-transform: scale(.8); + -webkit-animation-name: popout; + -moz-animation-name: popout; +} + +@-webkit-keyframes popin { + from { + -webkit-transform: scale(.8); + opacity: 0; + } + to { + -webkit-transform: scale(1); + opacity: 1; + } +} + +@-moz-keyframes popin { + from { + -moz-transform: scale(.8); + opacity: 0; + } + to { + -moz-transform: scale(1); + opacity: 1; + } +} + +@-webkit-keyframes popout { + from { + -webkit-transform: scale(1); + opacity: 1; + } + to { + -webkit-transform: scale(.8); + opacity: 0; + } +} + +@-moz-keyframes popout { + from { + -moz-transform: scale(1); + opacity: 1; + } + to { + -moz-transform: scale(.8); + opacity: 0; + } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slide.css b/css/structure/jquery.mobile.transitions.slide.css new file mode 100644 index 00000000..2d3f8ebb --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slide.css @@ -0,0 +1,50 @@ +/* slide transition */ +.slide.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; +} + +.slide.in { + -webkit-transform: translateX(0); + -webkit-animation-name: fadein; + -moz-transform: translateX(0); + -moz-animation-name: fadein; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slide.out.reverse { + -webkit-transform: translateX(100%); + -webkit-animation-name: slideouttoright; + -moz-transform: translateX(100%); + -moz-animation-name: slideouttoright; +} + +.slide.in.reverse { + -webkit-transform: translateX(0); + -webkit-animation-name: fadein; + -moz-transform: translateX(0); + -moz-animation-name: fadein; +} + +@-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%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slidedown.css b/css/structure/jquery.mobile.transitions.slidedown.css new file mode 100644 index 00000000..70c3761a --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slidedown.css @@ -0,0 +1,46 @@ +/* slide down */ +.slidedown.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.slidedown.in { + -webkit-transform: translateY(0); + -webkit-animation-name: slideinfromtop; + -moz-transform: translateY(0); + -moz-animation-name: slideinfromtop; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slidedown.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.slidedown.out.reverse { + -webkit-transform: translateY(-100%); + -moz-transform: translateY(-100%); + -webkit-animation-name: slideouttotop; + -moz-animation-name: slideouttotop; +} + +@-webkit-keyframes slideinfromtop { + from { -webkit-transform: translateY(-100%); } + to { -webkit-transform: translateY(0); } +} +@-moz-keyframes slideinfromtop { + from { -moz-transform: translateY(-100%); } + to { -moz-transform: translateY(0); } +} + +@-webkit-keyframes slideouttotop { + from { -webkit-transform: translateY(0); } + to { -webkit-transform: translateY(-100%); } +} +@-moz-keyframes slideouttotop { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(-100%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slideup.css b/css/structure/jquery.mobile.transitions.slideup.css new file mode 100644 index 00000000..91476c4f --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slideup.css @@ -0,0 +1,46 @@ +/* slide up */ +.slideup.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.slideup.in { + -webkit-transform: translateY(0); + -webkit-animation-name: slideinfrombottom; + -moz-transform: translateY(0); + -moz-animation-name: slideinfrombottom; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slideup.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.slideup.out.reverse { + -webkit-transform: translateY(100%); + -moz-transform: translateY(100%); + -webkit-animation-name: slideouttobottom; + -moz-animation-name: slideouttobottom; +} + +@-webkit-keyframes slideinfrombottom { + from { -webkit-transform: translateY(100%); } + to { -webkit-transform: translateY(0); } +} +@-moz-keyframes slideinfrombottom { + from { -moz-transform: translateY(100%); } + to { -moz-transform: translateY(0); } +} + +@-webkit-keyframes slideouttobottom { + from { -webkit-transform: translateY(0); } + to { -webkit-transform: translateY(100%); } +} +@-moz-keyframes slideouttobottom { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(100%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.turn.css b/css/structure/jquery.mobile.transitions.turn.css new file mode 100644 index 00000000..21f5c0ae --- /dev/null +++ b/css/structure/jquery.mobile.transitions.turn.css @@ -0,0 +1,83 @@ +/* The properties in this rule are only necessary for the 'flip' transition. + * We need specify the perspective to create a projection matrix. This will add + * some depth as the element flips. The depth number represents the distance of + * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate + * value. + */ + +.viewport-turn { + -webkit-perspective: 1000; + -moz-perspective: 1000; + position: absolute; +} +.turn { + -webkit-backface-visibility:hidden; + -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -webkit-transform-origin: 0; + + -moz-backface-visibility:hidden; + -moz-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -moz-transform-origin: 0; +} + +.turn.out { + -webkit-transform: rotateY(-90deg) scale(.9); + -webkit-animation-name: flipouttoleft; + -moz-transform: rotateY(-90deg) scale(.9); + -moz-animation-name: flipouttoleft; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.turn.in { + -webkit-animation-name: flipintoright; + -moz-animation-name: flipintoright; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; + +} + +.turn.out.reverse { + -webkit-transform: rotateY(90deg) scale(.9); + -webkit-animation-name: flipouttoright; + -moz-transform: rotateY(90deg) scale(.9); + -moz-animation-name: flipouttoright; +} + +.turn.in.reverse { + -webkit-animation-name: flipintoleft; + -moz-animation-name: flipintoleft; +} + +@-webkit-keyframes flipouttoleft { + from { -webkit-transform: rotateY(0); } + to { -webkit-transform: rotateY(-90deg) scale(.9); } +} +@-moz-keyframes flipouttoleft { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(-90deg) scale(.9); } +} +@-webkit-keyframes flipouttoright { + from { -webkit-transform: rotateY(0) ; } + to { -webkit-transform: rotateY(90deg) scale(.9); } +} +@-moz-keyframes flipouttoright { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(90deg) scale(.9); } +} +@-webkit-keyframes flipintoleft { + from { -webkit-transform: rotateY(-90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoleft { + from { -moz-transform: rotateY(-90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} +@-webkit-keyframes flipintoright { + from { -webkit-transform: rotateY(90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoright { + from { -moz-transform: rotateY(90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} diff --git a/css/themes/default/images/ajax-loader.gif b/css/themes/default/images/ajax-loader.gif new file mode 100644 index 00000000..fd1a189c Binary files /dev/null and b/css/themes/default/images/ajax-loader.gif differ diff --git a/css/themes/default/jquery.mobile.css b/css/themes/default/jquery.mobile.css index f0204d28..58fcd8f9 100644 --- a/css/themes/default/jquery.mobile.css +++ b/css/themes/default/jquery.mobile.css @@ -1,6 +1,14 @@ @import url( "jquery.mobile.theme.css" ); @import url( "../../structure/jquery.mobile.core.css" ); @import url( "../../structure/jquery.mobile.transitions.css" ); +@import url( "../../structure/jquery.mobile.transitions.fade.css" ), +@import url( "../../structure/jquery.mobile.transitions.pop.css" ), +@import url( "../../structure/jquery.mobile.transitions.slide.css" ), +@import url( "../../structure/jquery.mobile.transitions.slidedown.css" ), +@import url( "../../structure/jquery.mobile.transitions.slideup.css" ), +@import url( "../../structure/jquery.mobile.transitions.flip.css" ), +@import url( "../../structure/jquery.mobile.transitions.turn.css" ), +@import url( "../../structure/jquery.mobile.transitions.flow.css" ), @import url( "../../structure/jquery.mobile.grids.css" ); @import url( "../../structure/jquery.mobile.headerfooter.css" ); @import url( "../../structure/jquery.mobile.navbar.css" ); diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index 1e5c43e5..f73f5613 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -44,7 +44,7 @@ color: #2489CE /*{a-bar-link-visited}*/; } .ui-body-a, -.ui-dialog-page.ui-overlay-a { +.ui-overlay-a { border: 1px solid #2A2A2A /*{a-body-border}*/; background: #222222 /*{a-body-background-color}*/; color: #fff /*{a-body-color}*/; @@ -57,6 +57,9 @@ background-image: -o-linear-gradient( #666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); } +.ui-overlay-a { + background-image: none; +} .ui-body-a, .ui-body-a input, .ui-body-a select, @@ -184,7 +187,7 @@ color: #ddf0f8 /*{b-bar-link-visited}*/; } .ui-body-b, -.ui-dialog-page.ui-overlay-b { +.ui-overlay-b { border: 1px solid #C6C6C6 /*{b-body-border}*/; background: #cccccc /*{b-body-background-color}*/; color: #333333 /*{b-body-color}*/; @@ -197,6 +200,9 @@ background-image: -o-linear-gradient( #e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); } +.ui-overlay-b { + background-image: none; +} .ui-body-b, .ui-body-b input, .ui-body-b select, @@ -326,7 +332,7 @@ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; } .ui-body-c, -.ui-dialog-page.ui-overlay-c { +.ui-overlay-c { border: 1px solid #B3B3B3 /*{c-body-border}*/; color: #333333 /*{c-body-color}*/; text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/; @@ -338,6 +344,9 @@ background-image: -o-linear-gradient( #eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); } +.ui-overlay-c { + background-image: none; +} .ui-body-c, .ui-body-c input, .ui-body-c select, @@ -468,7 +477,7 @@ } .ui-body-d, -.ui-dialog-page.ui-overlay-d { +.ui-overlay-d { border: 1px solid #ccc /*{d-body-border}*/; color: #333333 /*{d-body-color}*/; text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/ #fff /*{d-body-shadow-color}*/; @@ -480,6 +489,9 @@ background-image: -o-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); } +.ui-overlay-d { + background-image: none; +} .ui-body-d, .ui-body-d input, .ui-body-d select, @@ -609,7 +621,7 @@ } .ui-body-e, -.ui-dialog-page.ui-overlay-e { +.ui-overlay-e { border: 1px solid #F7C942 /*{e-body-border}*/; color: #333333 /*{e-body-color}*/; text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/ #fff /*{e-body-shadow-color}*/; @@ -621,6 +633,9 @@ background-image: -o-linear-gradient( #fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); } +.ui-overlay-e { + background-image: none; +} .ui-body-e, .ui-body-e input, .ui-body-e select, @@ -975,13 +990,8 @@ a.ui-link-inherit { /* loading icon */ .ui-icon-loading { - background-image: url(images/ajax-loader.png); - width: 40px; - height: 40px; - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; - background-size: 35px 35px; + background: url(images/ajax-loader.gif); + background-size: 46px 46px; } diff --git a/css/themes/valencia/jquery.mobile.css b/css/themes/valencia/jquery.mobile.css index f0204d28..58fcd8f9 100644 --- a/css/themes/valencia/jquery.mobile.css +++ b/css/themes/valencia/jquery.mobile.css @@ -1,6 +1,14 @@ @import url( "jquery.mobile.theme.css" ); @import url( "../../structure/jquery.mobile.core.css" ); @import url( "../../structure/jquery.mobile.transitions.css" ); +@import url( "../../structure/jquery.mobile.transitions.fade.css" ), +@import url( "../../structure/jquery.mobile.transitions.pop.css" ), +@import url( "../../structure/jquery.mobile.transitions.slide.css" ), +@import url( "../../structure/jquery.mobile.transitions.slidedown.css" ), +@import url( "../../structure/jquery.mobile.transitions.slideup.css" ), +@import url( "../../structure/jquery.mobile.transitions.flip.css" ), +@import url( "../../structure/jquery.mobile.transitions.turn.css" ), +@import url( "../../structure/jquery.mobile.transitions.flow.css" ), @import url( "../../structure/jquery.mobile.grids.css" ); @import url( "../../structure/jquery.mobile.headerfooter.css" ); @import url( "../../structure/jquery.mobile.navbar.css" ); diff --git a/docs/_assets/js/jqm-docs.js b/docs/_assets/js/jqm-docs.js index 2e360c2a..69fddbd4 100644 --- a/docs/_assets/js/jqm-docs.js +++ b/docs/_assets/js/jqm-docs.js @@ -9,26 +9,6 @@ $(function(){ }); }); -function setDefaultTransition(){ - var winwidth = $( window ).width(), - trans ="slide"; - - if( winwidth >= 1000 ){ - trans = "none"; - } - else if( winwidth >= 650 ){ - trans = "fade"; - } - - $.mobile.defaultPageTransition = trans; -} - - -$(function(){ - setDefaultTransition(); - $( window ).bind( "throttledresize", setDefaultTransition ); -}); - // Turn off AJAX for local file browsing if ( location.protocol.substr(0,4) === 'file' || diff --git a/docs/pages/page-transitions.html b/docs/pages/page-transitions.html index 62462682..87aafc65 100755 --- a/docs/pages/page-transitions.html +++ b/docs/pages/page-transitions.html @@ -23,44 +23,97 @@
The jQuery Mobile framework includes a set of six CSS-based transition effects that can be applied to any page link or form submission with Ajax navigation:
+The jQuery Mobile framework includes a set of CSS-based transition effects that can be applied to any page link or form submission with Ajax navigation:
+ + + +fade |
+ dialog | +page | +
|---|---|---|
pop |
+ dialog | +page | +
flip |
+ dialog | +page | +
turn |
+ dialog | +page | +
flow |
+ dialog | +page | +
slide |
+ dialog | +page | +
slideup |
+ dialog | +page | +
slidedown |
+ dialog | +page | +
none |
+ dialog | +page | +
Transitions from jQtouch (with small modifications): Built by David Kaneda and maintained by Jonathan Stark.
- -NOTE: The flip transition isn't rendered correctly on most versions of Android because it lacks 3D CSS transform capabilities. Unfortunately, instead of ignoring the flip, Android makes the page "cartwheel" away by rotating instead of flipping. We recommend using this transition sparingly until support improves.
+NOTE: To view all transition types, you must be on a browser that supports 3D transforms. By default, devices that lack 3D support will fallback to "fade" for all transition types. This behavior is configurable (see below).
+Transitions were originally inspired by jQtouch They've since been rebuilt, but props to David Kaneda and Jonathan Stark for the initial guidance.
By default, the framework applies the right to left slide transition. To set a custom transition effect, add the data-transition attribute to the link.
By default, the framework applies a fade transition. To set a custom transition effect, add the data-transition attribute to the link.
<a href="index.html" data-transition="pop">I'll pop</a>
When the Back button is pressed, the framework will automatically apply the reverse version of the transition that was used to show the page. To specify that the reverse version of a transition should be used, add the data-direction="reverse" attribute to a link. Note: (this was formerly data-back="true", which will remain supported until 1.0)
For smoother page transitions, consider enabling the touchOverflow feature.
- +Set the defaultPageTransition global option if you'd prefer a different default transition. Dialogs have a different option called defaultDialogTransition that can also set configured.
All transitions are built with CSS keyframe animations and include both -webkit vendor prefixed rules for iOS, Blackberry, Android, Safari and Chrome browsers and -moz rules for Firefox browsers. Support for keyframe animations and transition smoothness is determined by the browser version and hardware and will safely fall back to no transition if animations aren't supported. To proactively exclude transition in situations with poor performance, we exclude browsers that lack 3D transforms and provide a fallback transition and apply a max width for when transitions are applied.
By default, all transitions except fade require 3D transform support. Devices that lack 3D support will fall back to a fade transition, regardless of the transition specified. We do this to proactively exclude poorly-performing platforms like Android 2.x from advanced transitions and ensure they still have a smooth experience. Note that there are platforms such as Android 3.0 that technically support 3D transforms, but still have poor animation performance so this won't guarantee that every browser will be 100% flicker-free but we try to target this responsibly.
+ +The fallback transition for browsers that don't support 3D transforms can be configured for each transition type, but by default we specify "fade" as the fallback. For example, this will set the fallback transition for the slideout transition to "none":
+$.mobile.fallbackTransition.slideout = "none"
+
+ By default, transitions can be disabled (set to "none") when the window width is greater than a certain pixel width. This feature is useful because transitions can be distracting or perform poorly on larger screens. This value is configurable via the global option $.mobile.maxTransitionWidth, which defaults to false. The option accepts any number representing a pixel width or false value. If it's not false, the handler will use a "none" transition when the window width is wider than the specified value.
During a CSS-based page transition, jQuery Mobile will place the class name of the transition on both the "from" and "to" pages involved in the transition. It then places an "out" class on the "from" page, and "in" class on the "to" page. The presence of these classes on the "from" and "to" page elements then triggers the animation CSS rules defined above.
+During a CSS-based page transition, jQuery Mobile will place the class name of the transition on both the "from" and "to" pages involved in the transition. It then places an "out" class on the "from" page, and "in" class on the "to" page. The presence of these classes on the "from" and "to" page elements then triggers the animation CSS rules defined above. As of jQuery Mobile version 1.1, animation class additions are queued, rather than simultaneous, producing an out-then-in sequence, which is friendlier for mobile rendering than our previous simultaneous transition sequence.
If your transition supports a reverse direction, you need to create CSS rules that use the reverse class in addition to the transition class name and the "in" and "out" classes:
In case you were wondering why none of the CSS rules above specified any easing or duration, it's because the CSS for jQuery Mobile defines the default easing and duration in the following rules:
-.in, .out {
- -webkit-animation-timing-function: ease-in-out;
- -webkit-animation-duration: 350ms;
+.in {
+ -webkit-animation-timing-function: ease-out;
+ -webkit-animation-duration: 350ms;
+ -moz-animation-timing-function: ease-out;
+ -moz-animation-duration: 350ms;
+}
+
+.out {
+ -webkit-animation-timing-function: ease-in;
+ -webkit-animation-duration: 225ms;
+ -moz-animation-timing-function: ease-in;
+ -moz-animation-duration: 225;
}
@@ -136,15 +198,14 @@
After the new page is loaded, the $.mobile.transitionHandlers dictionary is used to see if any transition handler function is registered for the given transition name. If a handler is found, that handler is invoked to start and manage the transition. If no handler is found the handler specified by the configuration option $.mobile.defaultTransitionHandler is invoked.
By default, the $.mobile.transitionHandlers dictionary is only populated with a single handler entry called "none". This handler simply removes the "ui-page-active" class from the page we are transitioning "from", and places it on the page we are transitioning "to". The transition is instantaneous; no animation, no fanfare.
By default, the $.mobile.transitionHandlers dictionary is only populated with a single handler entry called "default". This handler plays a dual purpose of either executing a "none" transition, which removes the "ui-page-active" class from the page we are transitioning "from", and places it on the page we are transitioning "to", or a Queued CSS3 Animated Transition, such as the one explained above. If the transition is "none", it will be instantaneous; no animation, no fanfare.
The $.defaultTransitionHandler points to a handler function that assumes the name is a CSS class name, and implements the "Pure CSS3 Based Transitions" section above.
The $.mobile.defaultTransitionHandler points to a handler function that assumes the name is a CSS class name, and implements the "Pure CSS3 Based Transitions" section above.
Both the "none" and "css3" transition handlers are available off of the $.mobile namespace:
+The default transition handler is available on the $.mobile namespace:
-$.mobile.noneTransitionHandler
-$.mobile.css3TransitionHandler
+$.mobile.transitionHandlers[ "default" ];
Once you do this, your handler will be invoked any time a transition name is used but not found within the $.mobile.transitionHandlers dictionary.
Transition handlers involve a number of critical operations, such as hiding any existing page, showing the new page, scrolling either to the top or a remembered scroll position on that new page, setting focus on the new page, and any animation and timing sequences you'd like to add. During development, we would recommend using jquery.mobile.transitions.js as a coding reference.
One of the key things jQuery Mobile does is store your scroll position before starting a transition so it can restore you to the same place once you return to the page when hitting the Back button or closing a dialog. Here are the same buttons from the top to test the scrolling logic.
+ + +fade |
+ dialog | +page | +
|---|---|---|
pop |
+ dialog | +page | +
flip |
+ dialog | +page | +
turn |
+ dialog | +page | +
flow |
+ dialog | +page | +
slide |
+ dialog | +page | +
slideup |
+ dialog | +page | +
slidedown |
+ dialog | +page | +
none |
+ dialog | +page | +
That was an animated page transition effect that we added with a data-transition attribute on the link.
Since it uses CSS transforms, this should be hardware accelerated on many mobile devices.
-What do you think?
- I like it +That was an animated page transition effect to a dialog that we added with a data-transition attribute on the link.
Since it uses CSS animations, this should be hardware accelerated on many devices. To see transitions, 3D transform support is required so if you only saw a fade transition that's the reason.
+ + Take me backThat was an animated page transition effect to a page that we added with a data-transition attribute on the link. This uses a different background theme swatch to see how that looks with the transitions.
Since it uses CSS animations, this should be hardware accelerated on many devices. To see transitions, 3D transform support is required so if you only saw a fade transition that's the reason.
+ + + Take me back +