cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              .flex-wrap
  form.color-card
  
    .color-card__header
      h1 Sign Up
      
    .color-card__body
      label(for="name") name
        input(type="text" name="name" required)
      label(for="email") email
        input(type="email" name="email" required)
      
    a(href="#0").color-card__button done
    
    .success__tick
      h1 DONE!
      // there seems to be some weirdness going on with the SVG in iOS
      // I will investigate after sleep & coffee xxx
      | <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="-75 20 250 50"><g transform="translate(0,-952.36218)"><path class="path" d="m 75.735759,983.36178 a 2.0002,2.0002 0 0 0 -1.1562,0.5937 c -10.261598,10.2838 -22.311598,22.29442 -32.718798,32.71882 L 25.26696,1002.8305 a 2.0085749,2.0085749 0 1 0 -2.5624,3.0938 l 18.000001,15 a 2.0002,2.0002 0 0 0 2.6874,-0.125 c 10.6635,-10.6864 23.3302,-23.30712 33.999998,-34.00002 a 2.0002,2.0002 0 0 0 -1.6562,-3.4375 z" fill="transparent" fill-opacity="1" stroke="#ffffff" marker="none" visibility="visible" display="inline" overflow="visible"/></g></svg>
      h2 Welcome Aboard!
      a(href="#0" id="demo-reset") reset demo?
    
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Quicksand');
$grad-color-1: #ffbf1e;
$grad-color-2: #de1aff;
$grad-color-3: #25f18d;
$bg-w: 100vw * 10;
$bg-h: 100vh * 10;
:root {
  font-size: calc(8px + 1vw);
  @media(max-width: 400px) {
    font-size: calc(14px + 1vw);
  }
}

body {
  font-family: 'quicksand';
  background: #fff;
}

.flex-wrap {
  padding: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.color-card {
  transition: height 500ms ease, width 500ms ease;
  text-align: center;
  color: rgba(#fff, 1);
  line-height: 1.5;
  background: linear-gradient(150deg, $grad-color-1, $grad-color-2, $grad-color-3);
  background-size: $bg-h $bg-w;
  box-shadow: 0px 18px 10px -10px rgba(#000, .2);
  border-radius: .3em;
  width: 30rem;
  max-width: 600px;
  animation: bgGrad 120s infinite;
  overflow: hidden;
  &__header {
    border-radius: .3em .3em 0 0;
    text-transform: uppercase;
    letter-spacing: .3em;
    padding: 2em .5em;
    background: rgba(#000, .1);
    h1 {
      font-size: 2rem;
      margin: 0;
    }
  }
  &__body {
    padding: 2em 1.5em;
    label {
      background: rgba(#000, .1);
      padding: .5em 1em;
      display: inline-block;
      border-radius: .3em;
      margin: 1em 0;
    }
    input {
      display: inline-block;
      background: transparent;
      padding: .5em 1em;
      border: none;
      border-radius: 0px;
      border-bottom: rgba(#fff, .3) dotted .2em;
      color: rgba(#fff, .78);
      font-size: 1rem;
      outline: none;
      margin-left: 1em;
      &:focus {
        border-bottom: rgba(#fff, .5) solid .2em;
      }
      &:valid {
        border-bottom: $grad-color-3 solid .2em;
      }
    }
  }
  &__button {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 0 0 .3em .3em;
    text-transform: uppercase;
    letter-spacing: .3em;
    padding: 2em .5em;
    background: rgba(#000, .1);
    transition: background 220ms ease;
    &:hover,
    &:focus {
      background: rgba(#000, .2);
    }
    &:active {
      background: rgba(#000, .3);
    }
  }
  .success__tick {
    display: none;
  }
  &.success {
    > * {
      display: none;
    }
    .success__tick {
      display: block;
        .path {
          transform: scale(1);
          stroke-width:.1em;
          stroke-dasharray: 700;
          stroke-dashoffset: 700;
          animation: dash 5s ease forwards;
      }
      #demo-reset {
        text-decoration: none;
        color: rgba(#fff, .6);
        border-bottom: .1em dotted currentColor;
        display: inline-block;
        margin-bottom: 1em;
        &:hover,
        &:focus {
          color: rgba(#fff, .78);
          border-bottom: .1em solid currentColor;
        }
      }
    }
  }
  &.submitted {
    height: 10rem;
    width: 10rem;
    animation: bgGrad 1500ms infinite, spinPulse 1000ms linear infinite 300ms;
    background-size: $bg-h/2 $bg-w/2;
    border-radius: 1em;
    box-shadow: none;
    transition: all 700ms ease;
    > * {
      display: none;
    }
  }
}

@keyframes bgGrad {
  0% {
    background-position: 10% 0%;
  }
  50% {
    background-position: 90% 100%;
  }
  100% {
    background-position: 10% 0%;
  }
}

@keyframes spinPulse {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(0.8);
  }
  80% {
    transform: rotate(288deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
    fill: #fff;
  }
}
            
          
!
            
              $(function() {
  var $form = $('.color-card');
  var $formSub = $('.color-card > .color-card__button');
  $reset = $('#demo-reset');

  $formSub.click(function() {
    $form.addClass('submitted').delay(3500).queue(function(next) {
      $form.removeClass('submitted').addClass('success').dequeue();
    });
  });
  $reset.click(function() {
    $form.removeClass('success');
  });
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console