-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from sorvell/30f3504cd6539762bf4958892ac592228…
…060229b g-overlay: refactor/simplify
- Loading branch information
Showing
3 changed files
with
177 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* Copyright 2012 The Toolkitchen Authors. All rights reserved. | ||
* Use of this source code is governed by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
|
||
@host { | ||
position: fixed; | ||
z-index: 10; | ||
outline: none; | ||
} | ||
|
||
/* | ||
TODO(sorvell): include a reasonable set of default overlay opening | ||
animations. What's here right now is ad hoc. | ||
*/ | ||
@host.g-overlay-fade { | ||
opacity: 0; | ||
-webkit-transition: all 0.218s; | ||
} | ||
|
||
@host.g-overlay-fade[opened] { | ||
opacity: 1; | ||
} | ||
|
||
@host.g-overlay-scale-slideup { | ||
opacity: 0.0; | ||
-webkit-transform: scale(1.05); | ||
-webkit-transition: all 0.218s; | ||
} | ||
|
||
@host.g-overlay-scale-slideup[opened] { | ||
opacity: 1.0; | ||
-webkit-transform: scale(1.0); | ||
} | ||
|
||
@host.g-overlay-scale-slideup:not([opened])[animating] { | ||
opacity: 0; | ||
-webkit-transform: translateY(-100%); | ||
-webkit-transition: all 1s; | ||
} | ||
|
||
@-webkit-keyframes g-overlay-shakeFadeIn { | ||
0% { | ||
display: block; | ||
opacity: 0; | ||
-webkit-transform: translateX(0); | ||
} | ||
10% { | ||
display: block; | ||
-webkit-transform: translateX(-50px); | ||
} | ||
30% { | ||
display: block; | ||
-webkit-transform: translateX(50px); | ||
} | ||
50% { | ||
display: block; | ||
-webkit-transform: translateX(-25px); | ||
} | ||
70% { | ||
display: block; | ||
-webkit-transform: translateX(25px); | ||
} | ||
90% { | ||
display: block; | ||
-webkit-transform: translateX(-13px); | ||
} | ||
100% { | ||
display: block; | ||
-webkit-transform: translateX(0); | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@-webkit-keyframes g-overlay-shakeFadeOut { | ||
0% { | ||
opacity: 1; | ||
-webkit-transform: translateX(0); | ||
} | ||
10% { | ||
-webkit-transform: translateX(-50px); | ||
} | ||
30% { | ||
-webkit-transform: translateX(50px); | ||
} | ||
100% { | ||
-webkit-transform: translateX(-100%); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@host.g-overlay-shake[opened] { | ||
-webkit-animation-duration: 0.5s; | ||
-webkit-animation-fill-mode: both; | ||
-webkit-animation-name: g-overlay-shakeFadeIn; | ||
} | ||
|
||
@host.g-overlay-shake:not([opened])[animating] { | ||
-webkit-animation-duration: 0.3s; | ||
-webkit-animation-fill-mode: both; | ||
-webkit-animation-name: g-overlay-shakeFadeOut; | ||
} |
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