123

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              #card(draggable="true")
  .left
    i.icon-reorder
    i.icon-envelope-alt
    i.icon-trash
    i.icon-beaker
  .right
    input.search(type="text", placeholder="Search")
    ul
      li
        .avatar.on
          img(src="https://i.imgur.com/PJ3erQF.jpg")
        h2
          a(href="https://en.wikipedia.org/wiki/Jens_Kidman") Jens Kidman
        p We are here to make coffee metal. We will make everything metal. Blacker than the blackest black times infinity.
      li
        .avatar.off
          img(src="https://i.imgur.com/khnOrSd.jpg")
        h2
          a(href="https://en.wikipedia.org/wiki/Fredrik_Thordendal") Fredrik Thordendal
        p This is, I believes, called food libraries.
      li
        .avatar.on
          img(src="https://i.imgur.com/aUYXAk4.jpg")
        h2
          a(href="https://en.wikipedia.org/wiki/Tomas_Haake") Tomas Haake
        p By the power of all that is evil, I command you to awaken and make me a sandwich!
      li
        .avatar.on
          img(src="https://i.imgur.com/s97iV8a.jpg")
        h2
          a(href="https://en.wikipedia.org/wiki/M%C3%A5rten_Hagstr%C3%B6m") Mårten Hagström
        p Oh, high school would've been awesome with a big pal, like him. He could have carried me to school!
      li
        .avatar.off
          img(src="https://i.imgur.com/BWUuDs2.jpg")
        h2
          a(href="https://en.wikipedia.org/wiki/Dick_L%C3%B6vgren") Dick Lövgren
        p Hey, why don't we just record people dying? Like all the world's leaders, or a bunch of ladies. That would be heavy.

footer Coded by 
  a(href="https://codepen.io/KenPowers") Kenneth Powers.
  | 
  a(href="http://www.premiumpixels.com/freebies/mini-mail-application-psd/") Original design (PSD)
  |  by 
  a(href="http://dribbble.com/ionuss") Ionut Zamfir
  | . Pictures / Names from 
  a(href="https://en.wikipedia.org/wiki/Meshuggah") Meshuggah
  | . Quotes from 
  a(href="https://en.wikiquote.org/wiki/Metalocalypse") Metalocalypse
  | .
            
          
!
            
              @card-width: 650px;
@card-height: 500px;
@left-width: 90px;

* {
  box-sizing: border-box;
}

body {
  background: rgb(71, 71, 81);
}

#card {
  position: absolute;
  width: @card-width;
  height: @card-height;
  left: 50%;
  top: 50%;
  margin-left: -(@card-width / 2);
  margin-top: -(@card-height / 2);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 5px #000;
  .left {
    position: absolute;
    top: 0;
    left: 0;
    width: @left-width;
    height: @card-height;
    background: linear-gradient(to right, #5790E5 0%, #5790E5 91%, #3A6BDC 100%);
    color: white;
    text-align: center;
    box-shadow: 0 0 1px #FFF inset;
    i {
      display: block;
      font-size: 32px;
      line-height: 40px;
      opacity: 0.5;
      border-top: 2px solid rgba(255, 255, 255, .1);
      padding: 15px;
      cursor: pointer;
      transition: opacity 0.25s;
      &:first-of-type {
        border: none;
        padding: 0;
        margin: 20px 0 30px 0;
        transition: none;
      }
      &:last-of-type {
        border-bottom: 2px solid rgba(255, 255, 255, .1);
      }
      &:hover:not(:first-of-type) {
        opacity: 1;
      }
      &:first-of-type:hover {
        cursor: move;
      }
    }
  }
  .right {
    position: absolute;
    top: 0;
    left: @left-width;
    background: rgb(252, 252, 252);
    width: @card-width - @left-width;
    height: @card-height;
    padding: 20px;
    .search {
      width: 100%;
      height: 40px;
      outline: none;
      border: 1px solid #E1E1E1;
      border-radius: 20px;
      padding: 0 20px;
      margin-bottom: 10px;
      &::-webkit-input-placeholder {
        color: #E1E1E1;
      }
      &::-moz-placeholder {
        color: #E1E1E1;
      }
    }
    ul {
      list-style-type: none;
      padding: 20px 0;
      margin: 0;
      height: @card-height - 40px - 20px - 10px;
      overflow: auto;
      position: relative;
      li {
        margin: 10px 0;
        padding: 10px 0;
        border-bottom: 1px solid #E1E1E1;
        height: 110px;
        position: relative;
        &:last-of-type {
          border: none;
        }
        &:hover .avatar img {
          opacity: 1;
        }
        .avatar {
          position: relative;
          width: 90px;
          height: 90px;
          img {
            border-radius: 45px;
            opacity: 0.75;
            transition: opacity .5s;
          }
          &::after {
            width: 14px;
            height: 14px;
            border: 4px solid #FFF;
            border-radius: 14px;
            content: "";
            position: absolute;
            top: 0;
            right: 0;
          }
          &.on::after {
            background: #41AB1B;
          }
          &.off::after {
            background: #F16F29;
          }
        }
        h2 {
          margin: 0;
          position: absolute;
          left: 100px;
          top: 10px;
          a {
            text-decoration: none;
            color: #3D3B49;
            &:visited {
              color: #3D3B49;
            }
          }
        }
        p {
          position: absolute;
          left: 100px;
          top: 25px;
          color: #8B889A;
        }
      }
    }
    // These pseudo-elements control the scroll fading.
    &::before {
      display: block;
      width: 100%;
      height: 40px;
      background: linear-gradient(to bottom, rgb(252, 252, 252) 0%, rgba(252, 252, 252, 0) 100%);
      content: "";
      position: absolute;
      top: 70px;
      left: 0;
      z-index: 1;
    }
    &::after {
      display: block;
      width: 100%;
      height: 40px;
      background: linear-gradient(to top, rgb(252,252,252) 0%, rgba(252, 252, 252, 0) 100%);
      content: "";
      position: absolute;
      left: 0;
      bottom: 0px;
    }
  }
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 40px;
  line-height: 40px;
  border-radius: 2px 0;
  text-align: center;
  color: #FFF;
  background: linear-gradient(to bottom, #5790E5 0%, #5790E5 91%, #3A6BDC 100%);
  box-shadow: 0 0 5px #000, 0 0 1px #FFF inset;
  font-weight: 200;
  a {
    color: rgb(252, 252, 252);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.5s;
    &:hover {
      color: #222;
    }
  }
}
            
          
!
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.

Console