Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
polymer-overlay: fix for polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Aug 6, 2013
1 parent 6a3743b commit 18ba97d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions polymer-overlay/polymer-overlay.css
Expand Up @@ -130,6 +130,44 @@ We address this by using script based positioning =(
}
}

.polymer-overlay {
position: fixed;
z-index: 10;
outline: none;
display: none;
opacity: 0.99;
-webkit-transition: opacity 0.001s;
transition: opacity 0.001s;
}

/*
The revealed class exists because it's necessary to 'show' a node
before applying a transition. When an overlay is opened, it is
immediately revealed (display: block) and then asynchronously the
opened or closing classes are added.
Because we don't want to actually show the node before a transition
or animation is applied, when the node is
revealed, it is made display: block but visibility: hidden.
It is then made visibility: visible when it is opened.
*/

.revealed {
display: block;
visibility: hidden;
}

.revealed.opened {
opacity: 1;
display: block;
visibility: visible;
}

.revealed.closing {
display: block;
visibility: visible;
}

.backdrop {
position: fixed;
left: 0;
Expand Down
4 changes: 2 additions & 2 deletions polymer-overlay/polymer-overlay.html
Expand Up @@ -256,10 +256,10 @@
continueRenderOpened: function() {
this.target.classList.toggle('opened', this.opened);
this.target.classList.toggle('closing', !this.opened);
//this.animating = this.asyncMethod('completeOpening', null, this.timeout);
this.animating = this.asyncMethod('completeOpening', null, this.timeout);
},
completeOpening: function() {
//clearTimeout(this.animating);
clearTimeout(this.animating);
this.animating = null;
this.target.classList.remove('closing');
this.target.classList.toggle('revealed', this.opened);
Expand Down

0 comments on commit 18ba97d

Please sign in to comment.