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="card-container card--fixedWidth">
  <div class="card">
    
    <div class="card__image" id="card-1">
      <div class="image-overlay">
      </div>
      <img src="https://d13yacurqjgara.cloudfront.net/users/2758/screenshots/1081469/gmail_mountain_day.jpg" alt="" />
    </div>
    <div class="card__actions">
<!--       &#8230; -->
    </div>
    <div class="card__description">
      <span class="line _long"></span>
      <span class="line _short"></span>
    </div>
    
  </div><!-- /.card -->
  
   <div class="card">
    
    <div class="card__image" id="card-2">
      <div class="image-overlay">
      </div>
      <img src="http://www.fubiz.net/wp-content/uploads/2014/11/Lotta-Nieminen_Google_07-640x553.jpg" alt="" />
    </div>
    <div class="card__actions">
<!--       &#8230; -->
    </div>
    <div class="card__description">
      <span class="line _long"></span>
      <span class="line _short"></span>
    </div>
    
  </div><!-- /.card -->
  
   <div class="card">
    
    <div class="card__image" id="card-3">
      <div class="image-overlay">
      </div>
      <img src="https://s-media-cache-ak0.pinimg.com/736x/e7/f2/98/e7f298f2db462652fd8b9a1ee888458a.jpg" alt="" />
    </div>
    <div class="card__actions">
<!--       &#8230; -->
    </div>
    <div class="card__description">
      <span class="line _long"></span>
      <span class="line _short"></span>
    </div>
    
  </div><!-- /.card -->
  
  <div class="card">
    
    <div class="card__image" id="card-4">
      <div class="image-overlay">
      </div>
      <img src="https://d39fx46bzv2q62.cloudfront.net/wp-content/uploads/2014/11/g9.jpg" alt="" />
    </div>
    <div class="card__actions">
<!--       &#8230; -->
    </div>
    <div class="card__description">
      <span class="line _long"></span>
      <span class="line _short"></span>
    </div>
    
  </div><!-- /.card -->
  
  <div class="card">
    
    <div class="card__image" id="card-5">
      <div class="image-overlay">
      </div>
      <img src="https://m1.behance.net/rendition/modules/141048491/disp/b8c8a47a1b5e7856968872c40d60ec7e.jpg" alt="" />
    </div>
    <div class="card__actions">
<!--       &#8230; -->
    </div>
    <div class="card__description">
      <span class="line _long"></span>
      <span class="line _short"></span>
    </div>
    
  </div><!-- /.card -->

 
</div><!-- /.card-container -->

<!-- 

The illustrations used in the cards do not belong to me. I did not create them nor is it my intention to pass these artist's work as my own. 

With that being said here are links where you can view the to the more of illustrator's work that was used:

card 1: 
https://dribbble.com/shots/1081469-Google-Now
 
cards 2,3,4,5: http://www.lottanieminen.com/illustration/google-calendar/

-->
              
            
!

CSS

              
                

// inspired by https://codepen.io/jaradlight/pen/IEbKq

body { background-color: #e9e9e9; }

// card scss
.card-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  //border: 1px solid #CAD0D2;
  border-radius: 4px;
  overflow: hidden;
  margin: 60px 5px 5px 5px;
  padding: 5px;
}

.card {
  display: flex;
  flex-direction: column;
  //border: 1px solid #CAD0D2;
  border-radius: 4px;
  align-items: left;
  margin: 5px;
  padding: 0 0 15px 0;
  width: 120px;
  background: #fff;
  box-shadow: 0px 3px 10px 1px rgba(0, 0, 0, 0.1);
}

.card__image {
  
  position: relative;
  $size: 100px;  
  width: 100%;
  display: block;
  max-width: 120px;
  height: 85px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  overflow: hidden;
  
  &:hover {
    cursor: pointer;
    &:after {
      bottom: 0;
      color: rgba(255,255,255,1);
      transition: (all .15s);
    }
    .image-overlay {
      background-color: rgba(35,155,55,.33);
      transition: (all .15s);
    }
  }
  
  &:after {
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: -4em;
    position: absolute;
    width: 100%;
    height: 100%;
    font-family: "FontAwesome";
    font-size: 1em;
    text-align: center;
    content: "\f00c";
    color: rgba(255, 255, 255, 0);
    color: #fff;
    transition: (all .15s);
  }
  
  .image-overlay {
    display: block;
    position: absolute;
    width: 100%;
    height: 85px;
    top: 0;
    left: 0;
    content: "";
    background-color: rgba (255,255,255,0);
    transition: (backgroundColor, .15s);
  }
  
  img {
    display: block;
    width: 100%;
  }
  
}

.card__actions {
  font-family: serif;
  font-size: 25px;
  line-height: 12px;
  color: #a3a3a3;
  text-align: right;
  padding: 0 8px 0 0;
  margin: 0;
}

// .is-checked animations

.card.is-checked {
  
  .card__image {
    &:after {
      font-size: 2.26em;
      bottom: 0;
      transition: all .15s;
    }
    
    .image-overlay {
      background-color: rgba(35,155,55,.66);
    }
  }
  
}

// random elements scss

span {
  display: block;
  border-radius: 3px;
  margin: 1em 1em 0 1em;
  background-color: #a3a3a3;
  &._long {
      margin-bottom: 1em;
      height: 4px;
      width: 68px;
  }
  &._short {
      height: 4px;
      width: 48px;
  }
}


              
            
!

JS

              
                $('.card').click(function(arg){
  $(this).toggleClass('is-checked');
  console.log('card-clicked');
});

              
            
!
999px

Console