Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="wrapper">
  
<header class="module-location">
  <ul class="location-quickstats">
    <li class="rating-negative">
      <i>Negative: </i>
      <span>27</span>
    </li>
    <li class="rating-positive">
      <i>Positive: </i>
      <span>82</span>
    </li>
    <li class="rating-total">
      <i>Negative: </i>
      <span>109</span>
    </li>
  </ul>
  <div class="location-title rating-positive">
    <h2>Pun Space</h2>
    <time>today</time>
  </div>
</header>
<ul class="module-history">
  <li class="rating-negative memo-yep">
    <h3>Book a flight to Melbourne</h3>
    <time>5 minutes ago</time>
    <i>Has a memo attached</i>
  </li>
  <li class="rating-negative">
    <h3>Grab some last Pad Thai w/ Yi</h3>
    <time>35 minutes ago</time>
    <i></i>
  </li>
  <li class="rating-positive">
    <h3>Clear desk at Pun Space</h3>
    <time>1 hour ago</time>
    <i></i>
  </li>
  <li class="rating-positive">
    <h3>Pick up w&t visa from embassy</h3>
    <time>1 hour ago</time>
    <i></i>
  </li>
  <li class="rating-negative memo-yep">
    <h3>Clear desk at Pun Space</h3>
    <time>2 hours ago</time>
    <i>Has a memo attached</i>
  </li>
  <li class="rating-negative memo-yep">
    <h3>Call the landlady</h3>
    <time>2 hours ago</time>
    <i>Has a memo attached</i>
  </li>
  <li class="rating-positive">
    <h3>Fix #rispen bug on WP8</h3>
    <time>3 hours ago</time>
    <i></i>
  </li>
  <li class="rating-positive">
    <h3>Talk business w/ Emma</h3>
    <time>3 hours ago</time>
    <i></i>
  </li>
  <li class="rating-positive memo-yep">
    <h3>Write Markup for history view</h3>
    <time>4 hours ago</time>
    <i></i>
  </li>
  <li class="rating-positive">
    <h3>Look up support for position: sticky</h3>
    <time>4 hours ago</time>
    <i></i>
  </li>
  <li class="rating-positive memo-yep">
    <h3>Skype call w/ Thomas</h3>
    <time>6 hours ago</time>
    <i></i>
  </li>
  <li class="rating-negative">
    <h3>Still adding geo-location to #rispen</h3>
    <time>6 hours ago</time>
    <i>Has a memo attached</i>
  </li>
  <li class="rating-negative">
    <h3>Add geo-location support to #rispen</h3>
    <time>7 hours ago</time>
    <i>Has a memo attached</i>
  </li>
</ul>
</div>
              
            
!

CSS

              
                @import "compass/css3";

@import "compass/utilities/general/clearfix";

.module-location {
  background-color: hsl(0,0%,0%);
  background-image: url('https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-frc3/1236043_628949037155666_1992414107_n.jpg');
  background-position: center center;
  background-size: cover;
  color: hsl(0,0%,100%);
  height: 140px;
  position: relative;
  &::before {
    background-color: hsla(0,0%,0%,.4);
    bottom: 0;
    content: '';
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
  .location-quickstats {
    @include background-image(linear-gradient(hsla(0,0%,0%,.8),hsla(0,0%,0%,0)));
    list-style: none;
    margin: 0;
    padding: 10px;
    position: relative;
    @include clearfix;
    li {
      float: left;
      line-height: 20px;
      margin-right: 15px;
      padding-left: 25px;
      position: relative;
      &:last-child {
        float: right;
        margin-left: 15px;
        margin-right: 0;
      }
      &.rating-negative i {
        background-image: url('https://i.imgur.com/O3MwGgn.png');
      }
      &.rating-positive i {
        background-image: url('https://i.imgur.com/icKomQ6.png');
      }
      &.rating-total i {
        background-image: url('https://i.imgur.com/MQgvlAI.png');
      }
      i {
        background-size: cover;
        color: transparent;
        display: block;
        font-size: 0;
        height: 20px;
        left: 0;
        margin-right: 5px;
        overflow: hidden;
        position: absolute;
        width: 20px;
      }
      span {
        display: inline-block;
        font-size: 0.8125em;
      }
    }
  }
  .location-title {
    bottom: 0;
    left: 0;
    padding: 0 50px 25px 50px;
    position: absolute;
    right: 0;
    @include background-image(linear-gradient(hsla(0,0%,0%,0),hsla(0,0%,0%,.8)));
    &.rating-positive {
      &::before {
        background-color: #5be225;
      }
      &::after {
        @include background-image(linear-gradient(#5be225, fade-out(#5be225,1)));
      }
    }
    &.rating-negative {
      &::before {
        background-color: #ff3927;
      }
      &::after {
        @include background-image(linear-gradient(#ff3927, fade-out(#ff3927,1)));
      }
    }
    &::before {
      border-radius: 50%;
      bottom: 45px;
      content: '';
      display: block;
      left: 20px;
      height: 11px;
      position: absolute;
      width: 11px;
    }
    &::after {
      bottom: -28px;
      content: '';
      display: block;
      height: 73px;
      left: 25px;
      position: absolute;
      width: 1px;
    }
    h2 {
      font-size: 1.125em;
      font-weight: 400;
      margin: 0;
    }
    time {
      color: hsla(0,0%,100%,.8);
      display: block;
      font-size: 0.8125em;
    }
  }
}


.module-history {
  list-style: none;
  margin: 0;
  padding: 15px 0;
  li {
    margin-bottom: 1px;
    padding: 9px 30px 7px 50px;
    position: relative;
    &.rating-positive {
      i {
        background-color: #5be225;
        &::before {
          @include background-image(linear-gradient(fade-out(#5be225,1),#5be225));
        }
        &::after {
          @include background-image(linear-gradient(#5be225, fade-out(#5be225,1)));
        }
      }
    }
    &.rating-negative {
      i {
        background-color: #ff3927;
        &::before {
          @include background-image(linear-gradient(fade-out(#ff3927,1),#ff3927));
        }
        &::after {
          @include background-image(linear-gradient(#ff3927, fade-out(#ff3927,1)));
        }
      }
    }
    &.memo-yep i {
      background-image: url('https://i.imgur.com/D6avt4N.png');
      background-image: -webkit-image-set( url('https://i.imgur.com/D6avt4N.png') 1x, url('https://i.imgur.com/qrG2rHB.png') 2x );
      background-size: cover;
      height: 21px;
      left: 15px;
      top: 10px;
      width: 21px;
      &::before,
      &::after {
        height: 35px;
        left: 10px;
      }
      &::before {
        top: -35px;
      }
      &::after {
        bottom: -35px;
      }
    }
    &:last-child i::before {
      height: 73px;
      top: -73px;
    }
    &:last-child i::after {
      display: none;
    }
  }
  h3,
  time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  h3 {
    color: hsl(0,0%,25%);
    font-size: 1.125em;
    font-weight: 400;
    margin: 0;
  }
  time {
    color: hsl(0,0%,65%);
    display: block;
    font-size: 0.625em;
    text-transform: uppercase;
  }
  i {
    background-color: hsl(0,0%,65%);
    border-radius: 50%;
    color: transparent;
    display: block;
    font-size: 0;
    height: 11px;
    left: 20px;
    position: absolute;
    top: 15px;
    width: 11px;
    z-index: 2;
    &::before,
    &::after {
      content: '';
      display: block;
      height: 40px;
      left: 5px;
      position: absolute;
      width: 1px;
      z-index: -1;
    }
    &::before {
      top: -40px;
    }
    &::after {
      bottom: -40px;
    }
  }
}

html {
  background-color: hsl(0,0%,85%);
  -webkit-font-smoothing: antialiased;
  padding-top: 50px;
  text-rendering: optimizeLegibility;
}

.wrapper {
  background-color: hsl(0,0%,100%);
  box-shadow: 0 3px 10px hsla(0,0%,0%,.2);
  margin: 0 auto;
  max-width: 320px;
}
              
            
!

JS

              
                // I am working on a web app targeted on mobile devices with my friend Thomas.
// If you liked this pen, check our our dev blog for further information and insights into our dev process :)
  
// http://rispen.nl/blog
              
            
!
999px

Console