Pen Settings



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


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.


  <h1>Dark Mode</h1>
  <p>This is quick Test for the usage of Dark Mode in webdesign. In macOS 10.14 Apple introduced a system-wide dark appearance accompanying the known light appearance. Dark Mode can be enabled in the General Settings of macOS.</p>
  <p>There is a Level 5 Media Query which detects whether someone uses the light or dark appearance of their macOS. As of today only Safari 12.1 has implemented it, but there is a good chance other browsers will follow. The media query reads as follows:</p>
  <pre><code>@media (prefers-color-scheme: dark) {
  /* dark mode styles */ 
  <p>This quick test uses a basic implementation of the media query.</p>
    <li><a href="" target="_blank">Apple Developer: Supporting Dark Mode in Your Interface</a></li>
    <li><a href="" target="_blank">Stuff &amp; Nonsense: Redesigning your product and website for dark mode</a></li>


                :root {
  --color-background: #efefef;
  --color-text-default: #1a1a1a;
  --color-accent: #008700;

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1a1a1a;
    --color-text-default: #ccc;
    --color-accent: #00b900;

html {
  background-color: var(--color-background);
  color: var(--color-text-default);
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.5;

article {
  margin: 2em auto;
  max-width: 640px;

h1 {
  font-size: 2.5rem;

p, ul {
  font-size: 1.25rem;

pre {
  font-size: 1.5rem;
  overflow-x: scroll;

a, a:visited {
  color: var(--color-accent);
  transition: color 0.3s ease-out;

a:hover, a:focus {
 color: var(--color-text-default);