Browse Source

Adding the right timing to the modal transition.

pull/214/head
connors 12 years ago
parent
commit
b097f47808
  1. 10
      dist/ratchet.css
  2. 10
      lib/sass/modals.scss

10
dist/ratchet.css vendored

@ -979,14 +979,16 @@ input[type="button"] {
background-color: #fff; background-color: #fff;
-webkit-transform: translate3d(0, 100%, 0); -webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
-webkit-transition: -webkit-transform .25s ease-in-out, opacity 1ms .25s; -webkit-transition: -webkit-transform .25s, opacity 1ms .25s;
transition: transform .25s ease-in-out, opacity 1ms .25s; transition: transform .25s, opacity 1ms .25s;
-webkit-transition-timing-function: cubic-bezier(0.1, 0.5, 0.1, 1);
} }
.modal.active { .modal.active {
opacity: 1; opacity: 1;
height: 100%; height: 100%;
-webkit-transition: -webkit-transform .25s ease-in-out; -webkit-transition: -webkit-transform .25s;
transition: transform .25 ease-in-out; transition: transform .25s;
-webkit-transition-timing-function: cubic-bezier(0.1, 0.5, 0.1, 1);
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }

10
lib/sass/modals.scss

@ -13,15 +13,17 @@
background-color: #fff; background-color: #fff;
-webkit-transform: translate3d(0, 100%, 0); -webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
-webkit-transition: -webkit-transform .25s ease-in-out, opacity 1ms .25s; -webkit-transition: -webkit-transform .25s, opacity 1ms .25s;
transition: transform .25s ease-in-out, opacity 1ms .25s; transition: transform .25s, opacity 1ms .25s;
-webkit-transition-timing-function: cubic-bezier(.1, .5, .1, 1); // Inspired by @c2prods
// Active modal // Active modal
&.active { &.active {
opacity: 1; opacity: 1;
height: 100%; height: 100%;
-webkit-transition: -webkit-transform .25s ease-in-out; -webkit-transition: -webkit-transform .25s;
transition: transform .25 ease-in-out; transition: transform .25s;
-webkit-transition-timing-function: cubic-bezier(.1, .5, .1, 1); // Inspired by @c2prods
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }

Loading…
Cancel
Save