Skip to content

Commit

Permalink
add animated popup example
Browse files Browse the repository at this point in the history
  • Loading branch information
josepharhar committed Sep 1, 2022
1 parent 22b8f53 commit 9e0421c
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81197,6 +81197,25 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
display:none and other display values is not possible.</p>
</div>

<div class="example">
<p>The following is an example of an animated pop-up:</p>

<pre><code class="html">&lt;div popup="auto" id="foo">
A fancy pop-up with no Javascript
&lt;/div>
&lt;style>
[popup] {
opacity: 0;
transform: translate(-100px,100px);
transition: all 1.5s;
}
[popup]:open {
transform: translate(0,0);
opacity: 1;
}
&lt;/style></code></pre>
</div>

<p>Every element which is not in the <span data-x="attr-popup-none-state">no pop-up state</span>
has the following members:</p>
<ul>
Expand Down Expand Up @@ -81916,22 +81935,22 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {

<pre><code class="html">&lt;div popup=auto id="foo">
This is a pop-up!
&lt;div>
&lt;/div>

&lt;button popupshowtarget="foo">
Show a pop-up
&lt;button></code></pre>
&lt;/button></code></pre>

<p>The following shows how <code data-x="attr-popup-toggle-target">popuptoggletarget</code> can
open and close a manual pop-up, which can't be closed with light dismiss:</p>

<pre><code class="html">&lt;div popup=manual id="foo">
This is a pop-up!
&lt;div>
&lt;/div>

&lt;button popuptoggletarget="foo">
Show or hide a pop-up
&lt;button></code></pre>
&lt;/button></code></pre>
</div>

<p>The <span>pop-up target attributes</span> allow certain types of buttons to show and hide
Expand Down

0 comments on commit 9e0421c

Please sign in to comment.