css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <article class="rating--box">
  <aside class="cover">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12117/new_hope.jpg" alt="Ghost In The Shell Cover" />
  </aside>
  <div class="meta">
    <h1>Star Wars Episode IV: A New Hope</h1>
    <h3>by George Lucas</h3>
    <p class="excerpt">Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.</p>
  
  <input type="radio" data-rate="1" name="rating" class="rating--star" />
  <input type="radio" data-rate="2" name="rating" class="rating--star"/>
  <input type="radio" data-rate="3" name="rating" class="rating--star" />
  <input type="radio" data-rate="4" name="rating" class="rating--star" checked />
    <input type="radio" data-rate="5" name="rating" class="rating--star"/>
  </div>
</article>

<article class="rating--box">
  <aside class="cover">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12117/ghost_in_the_shell.jpg" alt="Ghost In The Shell Cover" />
  </aside>
  <div class="meta">
    <h1>Ghost In The Shell</h1>
    <h3>by Mamoru Oshii</h3>
    <p class="excerpt">A female cyborg cop and her partner hunt a mysterious and powerful hacker called the Puppet Master.</p>
  
  <input type="radio" data-rate="1" name="rating-2" class="rating--star-2" />
  <input type="radio" data-rate="2" name="rating-2" class="rating--star-2" />
  <input type="radio" data-rate="3" name="rating-2" class="rating--star-2" checked />
  <input type="radio" data-rate="4" name="rating-2" class="rating--star-2" />
    <input type="radio" data-rate="5" name="rating-2" class="rating--star-2"/>
  </div>
</article>





<article class="rating--box">
  <aside class="cover">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12117/pulp_fiction.jpg" alt="Ghost In The Shell Cover" />
  </aside>
  <div class="meta">
    <h1>Pulp Fiction</h1>
    <h3>by Quentin Tarantino</h3>
    <p class="excerpt">The lives of two mob hit men, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.</p>
  
  <input type="radio" data-rate="1" name="rating-3" class="rating--star-3" />
  <input type="radio" data-rate="2" name="rating-3" class="rating--star-3" />
  <input type="radio" data-rate="3" name="rating-3" class="rating--star-3" />
  <input type="radio" data-rate="4" name="rating-3" class="rating--star-3" checked/>
    <input type="radio" data-rate="5" name="rating-3" class="rating--star-3" />
  </div>
</article>





<article class="rating--box">
  <aside class="cover">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12117/star_trek.jpg" alt="Ghost In The Shell Cover" />
  </aside>
  <div class="meta">
    <h1>Star Trek</h1>
    <h3>by Rick Berman, Michael Piller, Jeri Taylor</h3>
    <p class="excerpt">Pulled to the far side of the Galaxy, where the Federation is 75 years away at maximum warp speed, a Starfleet ship must cooperate with Maquis rebels to find a way home.</p>
  
  <input type="radio" data-rate="1" name="rating-4" class="rating--star-4" />
  <input type="radio" data-rate="2" name="rating-4" class="rating--star-4" />
  <input type="radio" data-rate="3" name="rating-4" class="rating--star-4" checked/>
  <input type="radio" data-rate="4" name="rating-4" class="rating--star-4" />
    <input type="radio" data-rate="5" name="rating-4" class="rating--star-4" />
  </div>
</article>


<footer class="credits">
  <p>Images and Descriptions taken from <a href="http://www.imdb.com/">IMDB</a>. Icons via <a href="http://weloveiconfonts.com">We Love Icon Fonts</a> (entypo Set). Movies made by awesome people. HTML & CSS by myself (who'd have expected that?)</p>
</footer>
            
          
!
            
              @import "compass/css3";

%grid--father {
  letter-spacing:-0.31em;
}

%grid--son {
  display:inline-block;
  letter-spacing:0;
  vertical-align:top;
}
@import url(http://weloveiconfonts.com/api/?family=entypo);

/* entypo */
[class*="entypo-"]:before {
  font-family: 'entypo', sans-serif;
}
* {
  margin:0;
  padding:0;
  @include box-sizing(border-box);
}

body {
  font:1em/1.65 Arial, Helvetica, sans-serif;
  background:#333;
}

a {
  color:#5CA3E6;
  
    &:hover {
      color:#97C0E6;
    }
}

.rating--box {
  width:100%;
  max-width:40em;
  height:auto;
  background:#fff;
  margin:2.5em auto;
  padding:1em;
  box-shadow: 0 0 5px black;
  @include border-radius(3px);
  
  @extend %grid--father;
}

.cover {
  width:40%;
  height:auto;
  @extend %grid--son;
  
  img {
    max-width: 100%;
    padding-right: 1rem;
  }
}

.meta {
  width:59%;
  @extend %grid--son;
  
  p {
    line-height:1.3;
    margin-bottom:1.5em;
  }
}

input[type=radio] {
  @include appearance(none);
  &:hover {
    cursor:pointer;
  }
}

.rating--star {
  color:#ff7711;
  &:before {
    content:"\2605";
    font-size:2em;
    font-family:entypo, sans-serif;
  }

  &:checked ~ :before {
    content:"\2606";
  }

  &:focus {
    outline:0;
  }
}

.rating--star-2 {
  color:darken(red, 10%);
  &:before {
    content:"\2665";
    font-size:2em;
    font-family:entypo, sans-serif;
  }

  &:checked ~ :before {
    content:"\2661";
  }

  &:focus {
    outline:0;
  }
}

.rating--star-3 {
  color:darken(red, 10%);
  &:before {
    content:"\1f3c6";
    font-size:2em;
    font-family:entypo, sans-serif;
    color:darken(#FBB829,10%);
  }

  &:checked ~ :before {
    content:"\1f3c6";
    color:lighten(black,15%);
  }

  &:focus {
    outline:0;
  }
}

.rating--star-4 {
  color:darken(red, 10%);
  &:before {
    content:"\1f680";
    font-size:2em;
    font-family:entypo, sans-serif;
    color:darken(#FBB829,10%);
  }

  &:checked ~ :before {
    content:"\1f680";
    color:lighten(black,15%);
  }

  &:focus {
    outline:0;
  }
}



.credits {
  width:100%;
  max-width:50em;
  margin:1.5em auto 0 auto;
  background:white;
  padding:1em 1.5em; 
}


@media all and (max-width:40em) {


body {
    padding:1.5em;
}



.cover {
  width:100%;
  height:15em;
  overflow:hidden;
    display:block;
  
  img {
    width:100%;
  }
}

.meta {
  width:100%;
  max-width:50em;
  //@extend %grid--son;
  
  p {
    line-height:1.3;
    margin-bottom:1.5em;
    }
  }

}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console