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

Auto Save

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

              
                <!--
  This is a demo of how to swap opacity of layers in Font Awesome's duotone icons.
We're using HTML color names to keep things simple. Check them all out at https://htmlcolorcodes.com/color-names.

Learn more: 
https://fontawesome.com/docs/web/style/duotone#swapping-layer-opacity
  -->

<html>
  <head>
    <title>Font Awesome Duotone Icons: Swapping Layer Opacity</title>
    
    <script src="https://kit.fontawesome.com/5d93eb1089.js" crossorigin="anonymous"></script>
  </head>

  <body>
    <main class="demo-frame">
      <!-- default duotone icons -->
      <section class="demo">        
        <article class="demo-example">
          <i class="fad fa-user-headset fa-fw"></i>
        </article>
        
        <article class="demo-example">
          <i class="fad fa-stars fa-fw"></i>
        </article>
        
        <article class="demo-example">
          <i class="fad fa-sunglasses fa-fw"></i>
        </article>
                
        <article class="demo-example">
          <i class="fad fa-envelope-open-text fa-fw"></i>
        </article>

        <article class="demo-example">
          <i class="fad fa-meteor fa-fw"></i>
        </article>
      </section>

      <!-- inverted duotone icons -->
      <section class="demo">        
        <article class="demo-example">
          <i class="fad fa-user-headset fa-swap-opacity fa-fw"></i>
        </article>
                
        <article class="demo-example">
          <i class="fad fa-stars fa-swap-opacity fa-fw"></i>
        </article>
        
        <article class="demo-example">
          <i class="fad fa-sunglasses fa-swap-opacity fa-fw"></i>
        </article>
        
        <article class="demo-example">
          <i class="fad fa-envelope-open-text fa-swap-opacity fa-fw"></i>
        </article>

        <article class="demo-example">
          <i class="fad fa-meteor fa-swap-opacity fa-fw"></i>
        </article>
      </section>
    </main>
  </body>
</html>
              
            
!

CSS

              
                .fa-envelope-open-text { color: mediumseagreen; }

.fa-sunglasses { color: darkslategray; }

.fa-meteor { color: slateblue; }

.fa-stars { color: gold; }

.fa-user-headset { color: deepskyblue; }





/* demo styling for individual example */
.demo-example {
  font-size: 5rem;
  padding: 1.5rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console