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


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.


    each val in ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
        -var demoClass = 'demo demo--' + val;
        span #{val}


                $b-radius: .7rem;

  width: 100%;
  height: 100%;

$colors-warm: purple, darkblue, crimson, orangered, gold, yellowgreen, steelblue;

$warm: (
  colors: $colors-warm,
  bg-color: orangered

$colors-cold: darkblue, violet, steelblue, skyblue, teal, yellowgreen, darkslateblue;

$cold: (
  colors: $colors-cold,
  bg-color: teal

$sizes: 1, 3, 5, 7, 11, 13, 17, 23;

@function gradient($colors) {
  $transp: rgba(255,255,255,.5);
  $out: null;
  @for $item from 1 through length($colors) {
    $color: transparentize(nth($colors, $item), 1 - 1/$item);
    $out-string: linear-gradient(90deg,
                $color 50%,
                $transp 50%);
    $out: append($out-string, $out, comma);
  @return $out;

@function sizes() {
  $out: null;
  @each $item in $sizes {
    $out-string: #{$item}em #{$item}em;
    $out: append($out-string, $out, comma);
  @return $out;

@mixin gradient-set ($colors-set: $cold){
  $grad-colors: map-get($colors-set, colors);
  $bg-color: map-get($colors-set, bg-color);

  background-image: gradient($grad-colors);
  background-color: $bg-color;
  background-size: sizes();

@mixin modes {
  $bl-modes: multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity;

@each $mode in $bl-modes {
    background-blend-mode: normal, $mode, overlay;

.demo, .demo:before {
  position: relative;
  height: 200px;
  margin-bottom: 2em;
  .demo {
    overflow: hidden;
    border-radius: $b-radius;
    @include gradient-set;
    &:before {
      content: "";
      display: block;
      position: absolute;
      width: 50%;
      left: 0;
      @include gradient-set($warm);
      border-radius: $b-radius*.85 0 0 $b-radius*.85; 
      border-right: 3px solid rgba(0, 0, 0, .15);
      box-shadow: 0 0 15px 5px rgba(0, 0, 0, .5);

@include modes;

  font: 20px/1.4 Georgia, serif;

  background: #FFF;

.l--wrapper {
  position: relative;
  min-width: 500px;
  margin: 1em auto;
  padding: 1em;
  SPAN {
    display: inline-block;
    position: absolute;
    z-index: 2;
    left: 50%;
    transform: translate(-50%);
    margin: -1.3em 0 0;
    padding: .6em 1.5em;
    background: rgba(255, 255, 255,.9);
    border: 2px solid rgba(0, 0, 0, .08);
    border-radius: $b-radius*.7;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .3);
    text-shadow: 1px 1px 0 rgba(155, 155, 155,.4);
    color: #222;


The Cicada Principle background + background-blend-mode

Warm colors are in the left side, cold colors - in the right.