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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

              
                <nav>
  <ul>
    <li>
      <a href="#">one</a>
    </li>
    <li>
      <a href="#">two</a>
    </li>
    <li>
      <a href="#">three</a>
    </li>
  </ul>
</nav>

<p>
Try this in 
<a href="https://www.mozilla.org/en-US/firefox/nightly/all/">Firefox Nightly</a>:
</p>

<pre>got to "about:config" in the URL bar 
Search for "text-" and set
layout.css.text-underline-offset.enabled = true
layout.css.text-decoration-thickness.enabled = true
layout.css.text-decoration-skip-ink.enabled = true</pre>

<p>
  This is based on a demo by
  <a href="https://codepen.io/jensimmons/pen/ZgzgWa">Jen Simmons</a>.
  Note that the fallbacks work great in any browser.  
  Lorem ipsum dolor sit amet nemo voluptatem. 
  <a href="#">Quis neque fugit</a> 
  perferendis odit quibusdam! 
  <a href="#">Expedita neque eveniet</a> 
  libero nam 
  recusandae quas nemo voluptatem adipisci? 
  Ipsam, provident eius.
</p>
              
            
!

CSS

              
                a:link,
a:visited {
  text-decoration-color: var(--warm-red);
  transition: 
    text-decoration-thickness 200ms ease-out, 
    text-underline-offset 200ms ease-out,
    text-decoration-color 200ms ease-out,
    color 200ms ease-out
  ; 
}

a:hover,
a:focus,
a:active {
  text-decoration-color: var(--color);
}

/* In the nav… */

/* Firefox beta flags have the numbers backwards…
   (there's not really any reason to support this) */
nav a:link,
nav a:visited {
  display: inline-block;
  padding: 0.25em;
  text-underline-offset: -1em; 
}

nav a:hover,
nav a:focus,
nav a:active {
  text-underline-offset: -0.25em; 
}

@supports (text-underline-offset: 1em) {
  nav a:hover,
  nav a:focus,
  nav a:active {
    text-decoration-color: var(--warm-red);
  }  
}

@supports (text-decoration-thickness: 1em) {
  nav a:link,
  nav a:visited {
    text-underline-offset: 1em; 
  }

  nav a:hover,
  nav a:focus,
  nav a:active {
    text-decoration-thickness: 0.25em;  
    text-underline-offset: 0.25em; 
  }  
}


/* In the paragraph… */

p a:link {
  text-underline-offset: -0.075em;
}

p a:hover {
  text-underline-offset: -0.375em;
}

@supports (text-decoration-thickness: 1em) {
  p a:link {
    text-decoration-thickness: 0.125em;  
    text-underline-offset: 0.125em;
    text-decoration-skip-ink: none;
  }

  p a:hover {
    color: var(--background);
    text-decoration-thickness: 1.125em;
    text-underline-offset: -0.875em;     
  }
}




/* layout… */

body {
  align-content: center;
  display: grid;
  grid-gap: 0.75em;
  grid-template-columns: fit-content(35em);
  justify-content: center;
  min-height: 100vh;
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  overflow: hidden;
}

p, pre {
  margin: 0;
}

/* override base styles */
a:hover,
a:focus,
a:active {
  font-family: var(--zilla);
}
              
            
!

JS

              
                
              
            
!
999px

Console