Pen Settings

HTML

CSS

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

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

              
                <p>The Workplace</p>
              
            
!

CSS

              
                *, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --background: 3deg 91% 5%;
  --color: 4deg 23% 87%;
  --shadow: 4deg 10% 54%;
  --opacity: 0.4;
  --font-size: 3rem;
  
  font-size: clamp(112.5%, 50% + 1vw, 200%);
}

body {
  background-color: hsl(var(--background));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

p {
  color: hsl(var(--color));
  font-size: var(--font-size);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow:
    0.3px -0.5px 0.7px hsl(var(--shadow) / var(--opacity)),
    1px -1.7px 2.2px hsl(var(--shadow) / var(--opacity)),
    2.6px -4.3px 5.7px hsl(var(--shadow) / var(--opacity)),
    6.3px -10.4px 13.7px hsl(var(--shadow) / var(--opacity));
}
              
            
!

JS

              
                const gui = new dat.GUI()

const guiFontSize = gui.add({ "font-size": 3 }, "font-size", 1, 10)
guiFontSize.onChange((value) => {
  this.fontSize = value
  document.documentElement.style.setProperty("--font-size", `${this.fontSize}rem`)
})

const guiColor = gui.addColor({ color: { h: 4, s: 0.23, v: 0.87 }}, "color")
guiColor.onChange((value) => {
  this.color = value
  document.documentElement.style.setProperty("--color", `${this.color.h}deg ${this.color.s * 100}% ${this.color.v * 100}%`)
})

const guiBackgroundColor = gui.addColor({ "bg-color": { h: 3, s: 0.91, v: 0.05 }}, "bg-color")
guiBackgroundColor.onChange((value) => {
  this.color = value
  document.documentElement.style.setProperty("--background", `${this.color.h}deg ${this.color.s * 100}% ${this.color.v * 100}%`)
})

const guiShadow = gui.addColor({ "text-shadow": { h: 4, s: 0.10, v: 0.54 }}, "text-shadow")
guiShadow.onChange((value) => {
  this.color = value
  document.documentElement.style.setProperty("--shadow", `${this.color.h}deg ${this.color.s * 100}% ${this.color.v * 100}%`)
})

const guiOpacity = gui.add({ opacity: 40 }, "opacity", 0, 100)
guiOpacity.onChange((value) => {
  this.opacity = value
  document.documentElement.style.setProperty("--opacity", `${this.opacity / 100}`)
})

gui.close()
              
            
!
999px

Console