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.


  CSS color generator
<h4>lighten - <span class="caption">makes a color lighter. Takes a color and a number between `0%` and `100%`, and returns a color with the lightness increased by that amount.</span></h4>
<h4>darken - <span class="caption">makes a color darker. Takes a color and a number between 0% and 100%, and returns a color with the lightness decreased by that amount</span></h4>
<div class="container">
  <ul class="colors">
    <li class="color accent--darken-4"></li>
    <li class="color accent--darken-3"></li>
    <li class="color accent--darken-2"></li>
    <li class="color accent--darken-1"></li>
    <li class="color accent">base</li>
    <li class="color accent--lighten-1"></li>
    <li class="color accent--lighten-2"></li>
    <li class="color accent--lighten-3"></li>
    <li class="color accent--lighten-4"></li>
  <ul class="colors">
    <li class="color primary--darken-4"></li>
    <li class="color primary--darken-3"></li>
    <li class="color primary--darken-2"></li>
    <li class="color primary--darken-1"></li>
    <li class="color primary">base</li>
    <li class="color primary--lighten-1"></li>
    <li class="color primary--lighten-2"></li>
    <li class="color primary--lighten-3"></li>
    <li class="color primary--lighten-4"></li>



  font-family: 'Arial'
  background-color: #1d1e22
  color: white

  display: flex
  flex-direction: row
  flex-wrap: wrap

  font-size: .8rem
  font-weight: normal
  list-style: none
  padding: 2rem
  width: 300px
  align-items: center
  width: 100%
  height: 50px
  display: flex
  justify-content: space-between
  position: relative
  padding: 0 1rem
// generate colors
$colors: (accent: #EA123B, primary: #006600)
$palettes: lighten darken

@each $color-key, $color-value in $colors
    background-color: #{$color-value}
      content: #{map-get($colors, #{$color-key})}

// @todo make placeholders or variables for .color content
@each $color-key, $color-value in $colors
  @each $palette in $palettes
    @for $i from 1 to 5
        @if quote(#{$palette}) == 'lighten'
          background-color: lighten(map-get($colors, #{$color-key}), 5 * $i)
            content: '#{$palette}--#{$color-key}-#{$i}'
            content: '#{lighten(map-get($colors, #{$color-key}), 5 * $i)}'
          background-color: darken(map-get($colors, #{$color-key}), 5 * $i)
            content: '#{$palette}--#{$color-key}-#{$i}'
            content: '#{darken(map-get($colors, #{$color-key}), 5 * $i)}'