Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


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


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.


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.


    <div class="wrapper">
      <div class="card">
        <div class="img-container">
          <img           src="$web_pdp_main_carousel_med$/190411135321/paper-twig-branches-set-of-four.jpg"
          <div class="overlay">
            <div class="btn-quick-view icon">
              <i class="fa fa-search"></i> QUICK VIEW
        <p>Crate and Barrel</p>
        <h4 class="title">Paper Twig Branches, Set of 4</h4>
        <p class="promotion">Use code SAVEMORE for 20% OFF</p>
        <button><i class="fa fa-shopping-cart"></i> BUY FROM SELLER</button>



                $button-height: 45px
$card-padding: 2em
$card-extra-padding: 1em
$img-dimension: 180px

    min-height: 100vh

    display: flex
    justify-content: center
    align-items: center
    background-color: #eeeeee
    font-family: 'Lato', sans-serif
    margin: 0

    padding: $card-padding
    position: relative
    box-sizing: content-box
    text-align: center
    width: 14em
    border-radius: 3px
    background-color: white
    justify-items: center
    transition: all 0.2s

        padding-left: calc(#{$card-padding} + #{$card-extra-padding})
        padding-right: calc(#{$card-padding} + #{$card-extra-padding})
        padding-bottom: calc(#{$card-padding} + #{$button-height})
        box-shadow: 0px 0px 8px 0px #b5b5b5

    &:hover button
        transition: .2s
        opacity: 1
        transform: translate(-50%, 0)

    & img
        height: $img-dimension
        width: $img-dimension

    font-weight: 300
    font-size: .9em
    line-height: .1em

    font-weight: 400
    font-size: .8em
    color: #C4941C

.card h4
    font-size: .9em
    line-height: 1em
    letter-spacing: 0.05em

.card h5
    font-weight: 300
    font-size: 1.1em
    line-height: .5em

    transition: all 0.2s
    position: absolute
    bottom: $card-padding
    width: 220px
    height: $button-height
    color: white
    background-color: black
    border: none
    border-radius: 1px
    z-index: 0
    opacity: 0
    left: 50%
    transform: translate(-50%, 200%)
    letter-spacing: .05em

    position: relative
    margin-left: 20px
    width: $img-dimension

    position: absolute
    top: 0
    bottom: 0
    left: 0
    right: 0
    height: $img-dimension
    width: $img-dimension
    opacity: 0
    transition: .2s ease

.card:hover .overlay
    opacity: .9
    background: rgba(0, 0, 0, 0.5)

    position: absolute
    width: 40px
    top: 50%
    left: 50%
    width: 60%
    transform: translate(-50%, -50%)

    font-size: .7em
    background-color: darken(gray, 10%)
    border: 1px solid #dbdbdb
    border-radius: 1px
    color: white
    padding: 12px 16px
    cursor: pointer
    transition: .1s ease
    letter-spacing: 0.15em
    font-weight: 300

        background-color: darken(gray, 40%)