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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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-wrapper">
    <!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist active">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlisted</span></div>
                </div>
            </div>
        </div>
    </div>
	 <!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlist</span></div>
                </div>
            </div>
        </div>
    </div>
	<!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlist</span></div>
                </div>
            </div>
        </div>
    </div>
	    <!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist active">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlisted</span></div>
                </div>
            </div>
        </div>
    </div>
	 <!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlist</span></div>
                </div>
            </div>
        </div>
    </div>
	<!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlist</span></div>
                </div>
            </div>
        </div>
    </div>
	
	<!--card template-->
    <div class="card">
        <a href="#">
            <div class="card__image">
                <img src="http://dummyimage.com/230x130/f4f4f4/cbcbcb.png">
            </div>
            <div class="card__details">
                <strong class="details__name">
                    Photography: Ditch Auto - Start Shooting in Manual
                </strong>
                <div class="details__instructor">
                    Jerad Hill,
                    Photography, Web Designer, Online Marketer, Husband, Father
                </div>
                <div class="details__bottom">
                    <div class="details__rating">
                      <span class="star-rating--static a11 text-medium-grey">
                        <span class="star-rating__star" style="width: 90.092%;"></span>
                      </span>
                        <span>(648)</span>
                    </div>
                    <div class="details__price">
                        <span class="price">$19</span>
                        <span class="price--old">$199</span>
                    </div>
                </div>
            </div>
        </a>
        <div class="card__options">
            <div class="options__wishlist">
                <i class="icon fa fa-heart"></i>
                <div class="tooltip left">
                    <div class="tooltip__arrow tooltip-arrow"></div>
                    <div class="tooltip__inner tooltip-inner"><span>Wishlist</span></div>
                </div>
            </div>
        </div>
    </div>
</div>
              
            
!

CSS

              
                // global
@ud-black: #000;
@ud-white: #fff;
@ud-green: #17aa1c;
@ud-orange: #ef8d2b;
@ud-red: #d23837;
@ud-dark-grey: rgba(0, 0, 0, .8);
@ud-highlight-grey: #cbcbcb;
@ud-medium-grey: rgba(0, 0, 0, .55);
@ud-line-grey: rgba(0, 0, 0, .25);
@font-size-sm:13px;
body {
  font-family:'Open Sans';
}

.card-wrapper{
    width:70%;
    margin: 0 auto;
}
.star-rating{
  &--static{
    position: relative;
    display: inline-block;
    &:before {
        	font-family: "FontAwesome";
		 	content: "\f005 \0020 \f005 \0020 \f005 \0020 \f005 \0020 \f005";
    }    
  }
  &__star{
        color:@ud-red;
        position: absolute;
        top: 0;
        left: 0;
        overflow: hidden;
        white-space: nowrap;
        z-index: 2;
        &:before {
            font-family: "FontAwesome";
            content: "\f005 \0020 \f005 \0020 \f005 \0020 \f005 \0020 \f005";
        }
    }
}
a{
  text-decoration:none;
  &:hover{
      text-decoration:none;
  }
}
.ellipsis-2lines{
    display: -webkit-box !important;
    display: -moz-box !important;
    display: box !important;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ellipsis {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-wrapper {
    &--list {
        li {
            margin-bottom: 10px;
        }
    }
    .price{
        font-weight: bold;
        color: @ud-green;
        &--old{
            color: @ud-black;
            text-decoration: line-through;
            margin-left: 5px;
        }
    }
    .label{
        &--new{
            border-radius: 0;
            background: @ud-white;
            font-weight: bold;
            padding: 3px 6px;
            position: absolute;
            bottom: 15px;
            left: 15px;
            z-index: 1;
            border: 1px solid @ud-green;
            color: @ud-green;
        }
        &--status{
            position: absolute;
            top: 10px;
            left: 10px;
            padding: 5px 10px;
            font-size: @font-size-sm;
            color: @ud-white;
        }
    }
}
.card{
    display: inline-block;
    vertical-align: top;
    margin: 10px;
    width: 230px;
    text-align: left;
    background-color: @ud-white;
    box-shadow: 0 2px 2px @ud-highlight-grey;
    position: relative;
    a{
        font-size: @font-size-sm;
        color: @ud-black;
    }
    &:hover {
        box-shadow: 0 0 6px @ud-medium-grey;
        img{
            opacity: 0.5;
        }
    }
    &__image{
        height: 129px;
        display: block;
        position: relative;
        background: @ud-black;
        img{
            width:100%;
        }
    }
    &__details{
        padding: 12px 15px;
        display: block;
    }
    .details{
        &__name,
        &__instructor {
            height:40px;
            .ellipsis-2lines;
        }
		 &__rating{
			 margin-bottom:5px;
		 }
        
    }
    &__options{
        position: absolute;
        top: 10px;
        right: 10px;
    }
    .options{
        &__wishlist{
            .tooltip{
                top: 0;
                right: 20px;
                transition:.25s cubic-bezier(0.46, 0.03, 0.52, 0.96);
                &__arrow{
                    border-left-color: @ud-white;
                }
                &__inner{
                    max-width: 175px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    text-align: right;
                    background-color: @ud-white;
                    color: @ud-dark-grey;
                }
            }
            .icon {
                font-size: 18px;
                color: @ud-dark-grey;
                -webkit-text-stroke: 1px @ud-white;
            }
            &.active {
                .icon {
                    color: @ud-red;
                    -webkit-text-stroke: 1px @ud-white;
                }
            }
            &:hover{
                cursor: pointer;
                .tooltip {
                    opacity: 1;
                }
            }
        }
        &__dropdown {
           &__btn {
               padding: 5px 7px;
               font-size: 15px;
               line-height: 1.35135;
               border-radius: 2px;
               border: 1px solid @ud-line-grey;
               background: @ud-white;
                i {
                    padding: 0;
                    color: @ud-line-grey;
                }
                &:hover,
                &:focus {
                    outline:none;
                    border-color: @ud-green;
                    i {
                        color: @ud-green;
                    }
                }
            }
           .dropdown-menu {
               box-shadow:0px 0px 5px rgba(0, 0, 0, 0.175);
               padding: 0;
               border: 0;
               a{
                   padding: 5px 12px;
               }
           }
        }
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console