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

              
                <html>
<head>
  <title>Font Awesome: Styling with Masking</title>
  
  <!-- We're using a Pro SVG+JS Kit to load Font Awesome Version 6 Latest -->
  <!-- Get your own Kit at fontawesome.com/kits -->
  <script src="https://kit.fontawesome.com/5d93eb1089.js" crossorigin="anonymous"></script>  
</head>

<body>
  <main class="demo-frame">
    <section class="demo">
      <article class="demo-example">

        
        <!-- The code for this feature showcase starts here -->

        <!-- An example of masking -->
        <div class="sample masking">                
          <div class="fa-4x">
            <i class="fa-solid fa-pencil-alt" data-fa-transform="shrink-10 up-.5" data-fa-mask="fa-solid fa-comment"></i>
            <i class="fa-brands  fa-facebook-f" data-fa-transform="shrink-3.5 down-1.6 right-1.25" data-fa-mask="fa-solid fa-circle"></i>
            <i class="fa-solid fa-headphones" data-fa-transform="shrink-6" data-fa-mask="fa-solid fa-square" ></i>
            <i class="fa-solid fa-mask" data-fa-transform="shrink-3 up-1" data-fa-mask="fa-solid fa-circle" ></i>
          </div>
        </div>
                
        <!-- The code for this feature showcase end here -->
        
      </article>  
    </section>    
  </main> 
</body>
</html>
              
            
!

CSS

              
                /* CSS styling for this feature */













/* demo styling - you don't need these styles for your power tranforms */
.sample {
  margin: var(--spacing-xl);
  padding: var(--spacing-xl);
  border: 2px solid var(--fa-navy);
  border-radius: var(--border-radius-md);
  background-color: var(--white);
}

.sample .svg-inline--fa { 
  background-color: MistyRose; 
}






              
            
!

JS

              
                /* JS for this feature */

              
            
!
999px

Console