Created
May 26, 2015 19:30
-
-
Save leandrojo/71a5fe725e32dcf50a13 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| .dialog, .modal-wrapper, | |
| .dialog__overlay { | |
| width: 100%; | |
| height: 100%; | |
| top: 0; | |
| left: 0; | |
| } | |
| .dialog, .modal-wrapper { | |
| position: fixed; | |
| display: -webkit-flex; | |
| display: flex; | |
| -webkit-align-items: center; | |
| align-items: center; | |
| -webkit-justify-content: center; | |
| justify-content: center; | |
| pointer-events: none; | |
| z-index: 1000; | |
| -webkit-transition: none; | |
| } | |
| .dialog__overlay { | |
| position: absolute; | |
| z-index: 120; | |
| background: rgba(55, 58, 71, 0.9); | |
| opacity: 0; | |
| -webkit-transition: opacity 0.3s; | |
| transition: opacity 0.3s; | |
| -webkit-backface-visibility: hidden; | |
| } | |
| .dialog--open .dialog__overlay { | |
| opacity: 1; | |
| pointer-events: auto; | |
| } | |
| .dialog__content, .modal { | |
| width: 100%; | |
| height: 100%; | |
| max-width: 560px; | |
| min-width: 290px; | |
| background: #fff; | |
| padding: 1em; | |
| text-align: center; | |
| position: relative; | |
| z-index: 800; | |
| opacity: 0; | |
| } | |
| .dialog--open .dialog__content, | |
| .modal.ng-enter { | |
| pointer-events: auto; | |
| opacity: 1; | |
| } | |
| /* Content */ | |
| .dialog h2 { | |
| margin: 0; | |
| font-weight: 400; | |
| font-size: 2em; | |
| padding: 0 0 2em; | |
| margin: 0; | |
| } | |
| .dialog__overlay { | |
| -webkit-transition-duration: 0.3s; | |
| transition-duration: 0.3s; | |
| } | |
| .dialog.dialog--open .dialog__content, | |
| .dialog.dialog--close .dialog__content, | |
| .modal.ng-enter, | |
| .modal.ng-leave { | |
| -webkit-animation-duration: 0.3s; | |
| animation-duration: 0.3s; | |
| -webkit-animation-fill-mode: forwards; | |
| animation-fill-mode: forwards; | |
| } | |
| .dialog.dialog--open .dialog__content, | |
| .modal.ng-enter { | |
| -webkit-animation-name: anim-open; | |
| animation-name: anim-open; | |
| } | |
| .dialog.dialog--close .dialog__content, | |
| .modal.ng-leave { | |
| -webkit-animation-name: anim-close; | |
| animation-name: anim-close; | |
| } | |
| .dialog.dialog--open h2, | |
| .dialog.dialog--open button { | |
| -webkit-animation: anim-elem 0.3s both; | |
| animation: anim-elem 0.3s both; | |
| } | |
| .dialog.dialog--open h2 { | |
| -webkit-animation-delay: 0.05s; | |
| animation-delay: 0.05s; | |
| } | |
| .dialog.dialog--open button { | |
| -webkit-animation-delay: 0.1s; | |
| animation-delay: 0.1s; | |
| } | |
| @-webkit-keyframes anim-open { | |
| 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } | |
| 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } | |
| } | |
| @keyframes anim-open { | |
| 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } | |
| 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } | |
| } | |
| @-webkit-keyframes anim-close { | |
| 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } | |
| 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } | |
| } | |
| @keyframes anim-close { | |
| 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } | |
| 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } | |
| } | |
| /* Inner elements animations */ | |
| @-webkit-keyframes anim-elem { | |
| 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); } | |
| 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } | |
| } | |
| @keyframes anim-elem { | |
| 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } | |
| 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment