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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                .banner.banner--vertical
  .info New Subscriber
.banner.banner--horizontal
  .info @jh3yy
  .info jhey.dev
img.avatar(src="https://assets.codepen.io/605876/avatar.png")
              
            
!

CSS

              
                *
  box-sizing border-box
  
body
  min-height 100vh
  background hsl(0, 0%, 10%)
  
.banner
  height 80px
  display flex
  align-items center
  padding 0 2rem
  background hsl(0, 25%, 50%)
  position fixed
  animation growIn 1s 
  transform rotate(calc(var(--rotate, 0) * 1deg)) scaleX(1) 

  
  &--horizontal
    width 100vw
    justify-content flex-end
    bottom 0
    left 0
    padding-right 200px
    transform-origin 100% 100%
    
  &--vertical
    --rotate -90
    position fixed
    left 100%
    bottom 0
    width 100vh
    transform-origin 0 100%
    padding-left 200px

@keyframes growIn
  from
    transform rotate(calc(var(--rotate, 0) * 1deg)) scaleX(0)
    
.info
  font-size 2rem
  font-weight bold
  color hsl(0, 0%, 100%)
  white-space nowrap
  
  & ~ .info
    margin-left 2rem
    
.avatar
  position fixed
  height 150px
  width 150px
  border-radius 50%
  background hsl(0, 0%, 100%)
  border 10px solid hsl(0, 25%, 50%)
  object-fit contain
  bottom 1rem
  right 1rem
              
            
!

JS

              
                
              
            
!
999px

Console