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

              
                .wrapper
  .grid__item
    a(href="#0").grid__item-top
      .top-holder
        div
          .tag.tag-success New
        div
          i.material-icons favorite
      .content
        h6.subtitle 15 Videos
        h3.title Vue JS and Laravel
      .overlay
        i.material-icons play_circle_filled
    .grid__item-bottom
      p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio quidem maxime, odit error. Dignissimos error, dolorem excepturi id exercitationem voluptatum perspiciatis culpa nam.
      .tag.tag-default Laravel
      .tag.tag-default Vue JS
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,600);

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600);

$font: 'Roboto';
$font-second: 'Open Sans';

:root {
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: $font;
  background: #f9f9f9;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

// using for a project, just mocking up one for now

.grid__item {
  width: 20rem;
  height: auto;
  overflow: hidden;
  border-radius: 4px;
  
  &-top {
    position: relative;
    background: url('https://laracasts.s3.amazonaws.com/images/video-thumbnails/series/vue-step-by-step.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 15rem;
    display: flex;
    align-items: flex-end;
    
    &:hover, &:focus {
      color: #fff;
      
      .overlay {
        opacity: 1;
      }
    }
    
    .top-holder {
      position: absolute;
      padding: 1rem;
      z-index: 10;
      width: 100%;
      display: flex;
      justify-content: space-between;
      
      i {
        color: red
      }
    }
    
    .content {
      position: relative;
      padding: 1rem;
      z-index: 10;
      color: #fff;
      
      .subtitle {
        color: rgba(255,255,255,.75);
        text-transform: uppercase;
        font-size: .85rem;
      }
    }
    
    .overlay {
      position: absolute;
      z-index: 5;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      background: rgba(52, 73, 94,.75);
      display: flex;
      justify-content: center;
      align-items: center;
      transition: 300ms ease;
      // on hover
      opacity: 0;
      
      i {
        font-size: 5rem;
      }
    }
  }
  
  &-bottom {
    border: 1px solid #ddd;
    padding: 1rem;
    background: #fff;
    
    p {
      color: #777;
    }
  }
}

// adjustment to tag

.tag-lg {
  padding: .5rem 1rem;
  font-size: .9rem;
}

.tag-md {
  padding: .25rem .5rem;
  font-size: .9rem;
}

// no copy

a {
  &:hover, &:focus {
    text-decoration: none;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console