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

              
                <main>
  <h1>New text-decoration settings!</h1>
  <p>So, there are a few new settings for text-decoration that are available. These are:</p>
  <ul>
    <li>text-decoration-color</li>
    <li>text-decoration-thickness</li>
    <li>text-decoration-skip-ink</li>
    <li>text-underline-offset</li>
  </ul>
  
  <h2>text-decoration-color</h2>
  <p>Pretty straightforward to start off with. This changes the color of the underline.</p>
  
  <h2>text-decoration-thickness</h2>
  <p>This changes the thickness of the underline. You can use whatever measurements here, but I used px for because I'm working with small things. I don't really wanna be messing with em, % or the others.</p>
  
  <h2>text-decoration-skip-ink</h2>
  <p>This one's a long name, but it allows you to control whether or not the underline skips over typographical descenders. Look at my titles. The underline appears behind the text because of this, mixed with offset.</p>
  
  <h2>text-underline-offset</h2>
  <p>This allows you add or remove spacing on the underline. Using a positive number moves the underline down, whereas using a negative will make the underline go up and appear behind the text.</p>
  
  <p><span class="test">Try them out on this text!</span></p>
  <p><span class="hover">Hover on this!</span></p>
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Fredoka+One|Raleway&display=swap');

:root{
  font-family: 'Raleway', sans-serif;
  font-size: 1.3em;
}

main{
  max-width: 65ch;
  margin: 0 auto;
  padding-bottom: 80px;
}

h1, h2, h3, h4, h5, h6{
  font-family: 'Fredoka One', cursive;
  text-decoration: underline;
  text-decoration-color: #EA5438;
  text-decoration-thickness: 6px;
  text-underline-offset: -3px;
  text-decoration-skip-ink: none;
}

li{
  margin-bottom: 1em;
}

ul li::marker{
  content: "🎁";
}

li:first-child{
  text-decoration: underline;
  text-decoration-color: #DE2477;
  text-decoration-thickness: 2px;
  text-underline-offset: 1px;
  text-decoration-skip-ink: none;
  text-decoration-style: wavy;
}

li:nth-child(2){
  text-decoration: underline;
  text-decoration-color: turquoise;
  text-decoration-thickness: 6px;
  text-underline-offset: 1px;
  text-decoration-skip-ink: none;
  text-decoration-style: dotted;
}

li:nth-child(3){
  text-decoration: underline;
  text-decoration-color: goldenrod;
  text-decoration-thickness: 4px;
  text-underline-offset: 4px;
  text-decoration-style: dashed;
}

li:nth-child(4){
  text-decoration: underline;
  text-decoration-color: springgreen;
  text-decoration-thickness: 4px;
  text-underline-offset: -4px;
  text-decoration-skip-ink: none;
  text-decoration-style: double;
}

.test{
  font-family: 'Fredoka One', cursive;
  font-size: 3em;
  
  text-decoration: underline;
  text-decoration-color: red;
  text-decoration-thickness: 20px;
  text-decoration-skip-ink: none;
  text-underline-offset: -10px;
}

.hover{
  font-family: 'Fredoka One', cursive;
  font-size: 3em;
  transition: 0.75s;
  
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 20px;
  text-decoration-skip-ink: none;
  text-underline-offset: -10px;
}

.hover:hover{
  text-decoration-color: deeppink;
}
              
            
!

JS

              
                
              
            
!
999px

Console