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.


                <div class="theme-light">
  <p>"Light" theme with a light background, dark text, and a red border.</p>

<div class="theme-dark">
  <p>"Dark" theme with a dark background, light text, and a cyan border.</p>


                // We use a SCSS map to document the names and values for our themes. This data will be used below to create theme classes. I used named css colors for fun, but css variables like $primary-color are common to use here.
$themes: (
    'light': (
        'background': GhostWhite,
        'foreground': DimGray,
        'border': Crimson
    'dark' : (
        'background': DarkSlateGray,
        'foreground': Honeydew,
        'border': Cyan

// This code will loop through each named theme in the list above, create styles for a class named .theme-[theme], and apply the set styles to the background, text color, and border.
@each $color, $values in $themes {
  .theme-#{$color} {
    background-color: map-get($values, 'background');
    color: map-get($values, 'foreground');
    border: 5px solid map-get($values, 'border');

// Extra styles to show containers more clearly
[class*="theme"] {
  padding: 1rem;
  margin: 0.5rem;
  border-radius: 15px;