Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                .launch-pad
  svg.rocket(viewBox="0 0 24 24")
    path(d="M20 22L16.14 20.45C16.84 18.92 17.34 17.34 17.65 15.73L20 22M7.86 20.45L4 22L6.35 15.73C6.66 17.34 7.16 18.92 7.86 20.45M12 2C12 2 17 4 17 12C17 15.1 16.25 17.75 15.33 19.83C15 20.55 14.29 21 13.5 21H10.5C9.71 21 9 20.55 8.67 19.83C7.76 17.75 7 15.1 7 12C7 4 12 2 12 2M12 12C13.1 12 14 11.1 14 10C14 8.9 13.1 8 12 8C10.9 8 10 8.9 10 10C10 11.1 10.9 12 12 12Z")
              
            
!

CSS

              
                *
  box-sizing border-box
  
body
  min-height 100vh
  display grid
  place-items center
  
.rocket
  height 25vmin
  fill hsl(0, 0%, 50%)
  animation launch 5s infinite

.launch-pad
  height 25vmin
  width 25vmin
  clip-path var(--clip, 'none')
  border-bottom 1vmin solid black
  background 'hsla(0, 50%, 50%, %s)' % var(--alpha, 0.5)
  
@keyframes launch
  0%, 10%
    transform translate(0, 150%)
  25%, 50%
    transform translate(0, 0)
  100%
    transform translate(0, -1000%)
              
            
!

JS

              
                import { GUI } from 'https://cdn.skypack.dev/dat.gui'

const CONFIG = {
  bounds: true,
  clipped: false
}

const UPDATE = () => {
  document.documentElement.style.setProperty('--clip', CONFIG.clipped ? `inset(-${window.innerHeight}px 0 0 0)` : 'none')
  document.documentElement.style.setProperty('--alpha', CONFIG.bounds ? 0.5 : 0)
}

const CONTROLLER = new GUI()

CONTROLLER.add(CONFIG, 'bounds').name('Show Bounds').onChange(UPDATE)
CONTROLLER.add(CONFIG, 'clipped').name('Clipped').onChange(UPDATE)
              
            
!
999px

Console