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

              
                <div class="site-icon-preview customizer">
  <div class="home-icon"><img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/building-exterior.webp" /></div>
  <div class="browser">
    <svg width="48" height="40" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg>
    <div class="tab">
      <img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/building-exterior.webp" class="site-icon" /> 
      <div class="site-title">Make WordPress Core</div>
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button">
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" />
</svg>

    </div>
  </div>
</div>
<hr />
<div class="site-icon-preview settings">
  <div class="home-icon"><img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" /></div>
  <div class="browser">
    <svg width="48" height="40" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg>
    <div class="tab">
      <img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" class="site-icon" /> 
      <div class="site-title">Make WordPress Core</div>
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button">
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" />
</svg>

    </div>
  </div>
</div>
<hr />

<div class="site-icon-preview settings black-icon">
  <div class="home-icon"><img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" /></div>
  <div class="browser">
    <svg width="48" height="40" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg>
    <div class="tab">
      <img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" class="site-icon" /> 
      <div class="site-title">Make WordPress Core</div>
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button">
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" />
</svg>

    </div>
  </div>
</div>
<hr />
<div class="site-icon-preview settings white-icon">
  <div class="home-icon"><img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" /></div>
  <div class="browser">
    <svg width="48" height="40" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg>
    <div class="tab">
      <img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" class="site-icon" /> 
      <div class="site-title">Make WordPress Core</div>
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button">
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" />
</svg>

    </div>
  </div>
</div>
<hr />

<div class="site-icon-preview settings red-icon">
  <div class="home-icon"><img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" /></div>
  <div class="browser">
    <svg width="48" height="40" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg>
    <div class="tab">
      <img src="https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp" class="site-icon" /> 
      <div class="site-title">Make WordPress Core</div>
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button">
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" />
</svg>

    </div>
  </div>
</div>
<hr />
              
            
!

CSS

              
                body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  flex-direction: column;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.site-icon-preview {
  //Layout
  display: flex;
  height: 60px;
  padding: 8px 0px 0px 8px;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  
  &.customizer {
    width: 275px;
  }

  &.settings {
    width: 350px;
    padding: 16px 0px 0px 16px;
    gap: 16px;
    height: 88px;
    
    .home-icon {
      width: 58px;
      height: 58px;
      border-radius: 12.95px;
    }
    
    .home-icon img {
      width: 58px;
      height: 58px;
      border-radius: 12.95px;
    }
    
    .home-icon:before {
      border-radius: 12.95px;
    }
    
    &:after {
      background: linear-gradient(0deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%), url(https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/tourist-and-building.webp) 50% / cover no-repeat;
    }
  }
}

.site-icon-preview:after {
  // Layout
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  transform: translateX(-25%) translateY(-25%);
  
  // Style
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), url(https://wp-themes.com/wp-content/themes/twentytwentyfour/assets/images/building-exterior.webp) 50% / cover no-repeat;
  filter: blur(12px);
}

.home-icon {
  // Layout
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  z-index: 1;
  overflow: hidden;
  position: relative;
  
  // Style
  border-radius: 9.824px;
}

.home-icon:before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  z-index: 1;
  
  // Style
  border-radius: 9.824px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.home-icon img {
  // Layout
  width: 44px;
  height: 44px;
}

.browser {
  // Layout
  display: flex;
  height: 100%;
  padding: 4px 4px 4px 12px;
  align-items: flex-start;
  gap: 16px;
  flex: 1 0 0;
  z-index: 1;
  
  // Style
  border-radius: 9.824px 0px 0px 0px;
  background: linear-gradient(180deg, #DCDCDE 0%, #BDBDBD 100%);
}

.browser-buttons {
  fill: #8C8F94;
}

.tab {
  // Layout
  display: flex;
  padding: 8px;
  align-items: center;
  gap: 8px;
  flex: 1 0 0;
  
  // Style
  border-radius: 4px;
background: #F6F7F7;
}

.site-icon {
  // Layout
  width: 24px;
  height: 24px;
}

.close-button {
  // Style
  fill: #50575E;
}

.site-title {
  // Layout
  width: 51px;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 0 0;
  overflow: hidden;
  
  // Style
  font-size: 14px;
  font-weight: 500;
}

.black-icon {
  .home-icon {
    background: black;
  }
  .home-icon img {
    display: none;
  }
  &:after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%) black !important;
  }
}

.white-icon {
  .home-icon {
    background: white;
  }
  .home-icon img {
    display: none;
  }
  &:after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%) white !important;
  }
}

.red-icon {
  .home-icon {
    background: red;
  }
  .home-icon img {
    display: none;
  }
  &:after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%) red !important;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console