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

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

              
                .user-badge.us
  .badge-guild.middled
    i.em.em-us
  .badge-level 15
  .badge-avatar
    .photo style="background:url(http://dof.gob.mx/imagenes_diarios/2009/08/21/MAT/semarna11_Cimg_97607.png);background-size:cover"
  .badge-name.middled George Washington
    
.user-badge.gb
  .badge-guild.middled
    i.em.em-gb
  .badge-level 2
  .badge-avatar
    .photo
  .badge-name.middled Alfred The Great

.user-badge.se
  .badge-guild.middled
    i.em.em-flag-se
  .badge-level 12
  .badge-avatar
    .photo
  .badge-name.middled Gustav Vasa
  
  
.user-badge
  .badge-guild.middled
    i.em.em-flag-
  .badge-level 33
  .badge-avatar
    .photo
  .badge-name.middled Anonymous
  .badge-rank
    i.em.em-star2
    i.em.em-star2
    i.em.em-star2
    i.em.em-star2
  
.br

.user-badge.ie
  .badge-guild.middled
    i.em.em-flag-ie
  .badge-level 26
  .badge-avatar
    .photo
  .badge-name.middled Arthur Guinness
  
.user-badge.no
  .badge-guild.middled
    i.em.em-flag-no
  .badge-level 96
  .badge-avatar
    .photo
  .badge-name.middled Harald Blåtand
  
.user-badge.dk
  .badge-guild.middled
    i.em.em-flag-dk
  .badge-level 84
  .badge-avatar
    .photo
  .badge-name.middled Svend Tveskæg
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Poppins')

body
  background: #333

*
  box-sizing: border-box

.middled
  position: relative
  top: 50%
  transform: translateY(-50%)

.user-badge  
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2)
  font-family: 'Poppins'
  display: inline-block
  font-weight: normal
  border-radius: 32px
  overflow: visible
  font-size: 1.2rem
  background-image: linear-gradient(225deg, #777 0%, #101010 15%, #606060 50%, #101010 100%);
  padding: 1px 15px 1px 15px
  color: rgba(255, 255, 255, 0.8)
  height: 46px
  margin-left: -10px
  margin-top: -3px
  border: 1px solid rgba(0, 0, 0, 0.1)
  cursor: pointer

.user-badge:hover 
  transform: scale(1.1)
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5)
  color: rgba(255, 255, 255, 1)
   
.user-badge:hover .badge-level 
  color: #fff
  
.user-badge:hover .badge-guild
  opacity: 1
  
.user-badge:hover .photo
  filter: none
  transform: scale(1.1)
  border: 1px solid rgba(255, 255, 255, 0.4)
  
.photo
  background: #000 url(https://static.codepen.io/assets/profile/profile-bg-8ff33bd9518be912289d4620cb48f21eb5c9a2e0b9577484126cfe10a5fb354f.svg)
  background-size: cover
  display: block
  width: 45px
  height: 45px
  border-radius: 50%
  filter: brightness(1.2) saturdate(0)
  border: 2px solid rgba(255, 255, 255, 0.4)
  box-shadow: 0 5px 5px rgba(255, 255, 255, 0.1)
  
.badge-avatar {
  margin: 0 5px 0 5px  
  transform: scale(1.2)
  float: left
  position: relative
  top: -3px
}

.badge-level
  font-weight: 900
  font-size: 190%
  letter-spacing: -0.1rem
  color: rgba(255, 255, 255, 1)
  float: left
  padding: 0 12px 0 5px
  position: relative
  top: -8px
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2)
  
.badge-name
  font-weight: 500
  font-size: 100%
  letter-spacing: -0.07rem
  float: left
  padding: 0 5px 0 5px

.badge-guild
  float: left
  padding: 0 5px 0 5px

.badge-rank
  float: left
  font-size: 60%
  transform: translateY(12px)
  padding: 0 0 0 8px
  
.us
  background-image: linear-gradient(225deg, #fff 0%, #bf0a30 15%, #002868 85%, #fff 100%)
.gb
  background-image: linear-gradient(225deg, #fff 0%, #002776 35%, rgb(198, 12, 48) 85%, #fff 100%)
.se
  background-image: linear-gradient(225deg, #fff 0%, #005293 15%, #fecb00 100%)
.ie 
  background-image: linear-gradient(225deg, #fff 0%, #009a49 15%, #ff7900 100%)
.no
  background-image: linear-gradient(225deg, #fff -40%, #ed2939 30%, #002664 100%)
.dk 
  background-image: linear-gradient(225deg, #c60c30 10%, #fff 110%)
              
            
!

JS

              
                
              
            
!
999px

Console