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="z-1">Level One</div>
<div class="z-2">Level Two</div>
<div class="z-3">Level Three</div>
<div class="z-4">Level Four</div>
<div class="z-5">Level Five</div>
<button class="z-2 z-h">Hover Me!</button>


                // Material Shadow Mixin. Ripped from CSS Tricks. This is most of the heavy lifting and I can't take credit.
// Source ->

@function top-shadow($depth) {
  $primary-offset: nth(1.5 3 10 14 19, $depth) * 1px;
  $blur: nth(1.5 3 10 14 19, $depth) * 4px;
  $color: rgba(black, nth(.12 .16 .19 .25 .30, $depth));

  @return 0 $primary-offset $blur $color;
@function bottom-shadow($depth) {
  $primary-offset: nth(1.5 3 6 10 15, $depth) * 1px;
  $blur: nth(1 3 3 5 6, $depth) * 4px;
  $color: rgba(black, nth(.24 .23 .23 .22 .22, $depth));

  @return 0 $primary-offset $blur $color;
@mixin card($depth) {
  @if $depth < 1 {
    box-shadow: none;
  } @else if $depth > 5 {
    @warn "Invalid $depth `#{$depth}` for mixin `card`.";
  } @else {
    box-shadow: bottom-shadow($depth), top-shadow($depth);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);  

// My Contribution: I added a @for so I don't have to keep writing the same code. This gives you a z-1 through z-5 class output and a z-h class for hoverables.

@for $i from 1 through 5 {
  .z-#{$i} {
    @include card($i);
  .z-h:hover {
    @include card(5);

// Just some basic styling.
div {
  height: 125px;
  float: left;
  margin: 1em;
  padding: 25px;
button {
  margin: 1em;
  background: orange;
  border: 1px orange solid;
  font-size: 2em;
  color: white;
  padding: 15px 30px;
  cursor: pointer;
  border-radius: 5px;