Skip to content

Instantly share code, notes, and snippets.

@Janet-Lu
Last active August 24, 2016 03:45
Show Gist options
  • Select an option

  • Save Janet-Lu/0e13ac9b32c39bd3cd51d0f3a5ba15c4 to your computer and use it in GitHub Desktop.

Select an option

Save Janet-Lu/0e13ac9b32c39bd3cd51d0f3a5ba15c4 to your computer and use it in GitHub Desktop.

Revisions

  1. Janet-Lu revised this gist Aug 24, 2016. 1 changed file with 18 additions and 1 deletion.
    19 changes: 18 additions & 1 deletion dabblet.css
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,15 @@
    transform-origin: 1.4em 0em;
    }*/

    /******************************************************/

    /*
    @keyframes elastic-grow {
    from { transform: scale(0); }
    70% {
    transform: scale(1.1);
    animation-timing-function:
    cubic-bezier(.5,.5,.5,.5); /* Reverse ease */
    cubic-bezier(.5,.5,.5,.5);
    }
    }
    @@ -22,6 +25,20 @@ input:focus + .callout { animation: elastic-grow .5s; }
    .callout {transform-origin: 1.4em -.4em; }
    */


    input:not(:focus) + .callout:not(:hover) {
    transform: scale(0);
    transition: .25s transform;
    }

    .callout {
    transition: .5s cubic-bezier(.25,.1,.3,1.5) transform;
    transform-origin: 1.4em -.4em;
    }





  2. Janet-Lu revised this gist Aug 24, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dabblet.css
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    @keyframes elastic-grow {
    from { transform: scale(0); }
    70% {
    transform: scale(2);
    transform: scale(1.1);
    animation-timing-function:
    cubic-bezier(.5,.5,.5,.5); /* Reverse ease */

  3. Janet-Lu revised this gist Aug 24, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -9,9 +9,9 @@
    @keyframes elastic-grow {
    from { transform: scale(0); }
    70% {
    transform: scale(1.1);
    transform: scale(2);
    animation-timing-function:
    cubic-bezier(.1,.25,.66,1.91); /* Reverse ease */
    cubic-bezier(.5,.5,.5,.5); /* Reverse ease */

    }
    }
  4. Janet-Lu created this gist Aug 24, 2016.
    63 changes: 63 additions & 0 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    /*input:not(:focus) + .callout {
    transform: scale(0); /* hid
    }
    .callout {
    transition: .5s;
    transform-origin: 1.4em 0em;
    }*/

    @keyframes elastic-grow {
    from { transform: scale(0); }
    70% {
    transform: scale(1.1);
    animation-timing-function:
    cubic-bezier(.1,.25,.66,1.91); /* Reverse ease */

    }
    }

    input:not(:focus) + .callout { transform: scale(0); }

    input:focus + .callout { animation: elastic-grow .5s; }

    .callout {transform-origin: 1.4em -.4em; }




    /* Styling */
    body {
    padding: 1.5em;
    font: 200%/1.6 Baskerville;
    }

    input {
    display: block;
    padding: 0 .4em;
    font: inherit;
    }

    .callout {
    position: absolute;
    max-width: 14em;
    padding: .6em .8em;
    border-radius: .3em;
    margin: .3em 0 0 -.2em;
    background: #fed;
    border: 1px solid rgba(0,0,0,.3);
    box-shadow: .05em .2em .6em rgba(0,0,0,.2);
    font-size: 75%;
    }

    .callout:before {
    content: "";
    position: absolute;
    top: -.4em;
    left: 1em;
    padding: .35em;
    background: inherit;
    border: inherit;
    border-right: 0;
    border-bottom: 0;
    transform: rotate(45deg);
    }
    5 changes: 5 additions & 0 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    <label>
    Your username: <input id="username" />
    <span class="callout">Only letters, numbers,
    underscores (_) and hyphens (-) allowed!</span>
    </label>
    1 change: 1 addition & 0 deletions dabblet.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    // alert('Hello world!');
    1 change: 1 addition & 0 deletions settings.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}