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.

              <p aria-label="CodePen">
  <span data-text="C">C</span>
  <span data-text="O">O</span>
  <span data-text="D">D</span>
  <span data-text="E">E</span>
  <span data-text="P">P</span>
  <span data-text="E">E</span>
  <span data-text="N">N</span>

              // Brownish
background-color = hsla(353, 8%, 40%, 1)
// Purple
background-color = hsla(259, 36%, 47%, 1)
// CodePen Grey
//background-color = #252527
// CodePen Blue
//background-color = hsla(210, 63%, 53%, 1)

// Some settings
shadow-scale =       1.1
letter-spacing =     (300em/1000)
initial-skew =       -40deg
hover-skew =         -10deg
animation-duration = .3s

// Automatic settings
shadow-initial-skew = ((initial-skew / 2) * -1)
shadow-hover-skew =   ((hover-skew / 2) * -1)

// Styles
  color #fff
  font-family Avenir Next, Helvetica Neue, Helvetica, Tahoma, sans-serif
  font-size 1em
  font-weight 700

    display inline-block
    position relative
    transform-style preserve-3d
    perspective 500
    -webkit-font-smoothing antialiased
      display none
      position absolute
      top 0
      left -1px
      transform-origin left top
      transition all ease-out animation-duration
      content attr(data-text)

      z-index 1
      color rgba(0, 0, 0, .2)
      transform scale(shadow-scale, 1) skew(0deg, shadow-initial-skew)

      z-index 2
      color background-color
      text-shadow -1px 0 1px background-color, 1px 0 1px rgba(0, 0, 0, .8)
      transform rotateY(initial-skew)

        transform scale(shadow-scale, 1) skew(0deg, shadow-hover-skew)
        transform rotateY(hover-skew)

    & + span
      margin-left letter-spacing
  @media (min-width: 20em)
    font-size 2em
    	display block
  @media (min-width: 30em)
    font-size 3em
  @media (min-width: 40em)
    font-size 5em
  @media (min-width: 60em)
    font-size 8em

// Unimportant bits
  margin 0
  padding 0
  height 100%

  display flex
  align-items center
  justify-content center
  background-color background-color
🕑 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.