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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                .container
  .item.item--square
    h1.title( data-title="Square" ) Square
    .preview( data-preview="Square shape preview" )
  .item.item--circle
    h1.title( data-title="Circle" ) Circle
    .preview( data-preview="Circle shape preview" )
  .item.item--triangle
    h1.title( data-title="Triangle" ) Triangle
    .preview( data-preview="Triangle shape preview" )
  .item.item--arrow
    h1.title( data-title="Arrow" ) Arrow
    .preview( data-preview="Arrow shape preview" )
              
            
!

CSS

              
                body
  background #292929
  margin 0
  padding 0
  width 100vw
  height 100vh
  position relative
  overflow hidden

  .container
    position absolute
    top 50%
    left 50%
    transform translate( -50%, -50% )

  .item
    position relative

    &:not( :last-child )
      margin-bottom 2vh
      border-bottom solid 1px #ECF0F1

  .title
    font-size 8vh
    text-transform uppercase
    color #95A5A6
    margin 0

    &:before
      content attr( data-title )
      color #ECF0F1

  .preview
    width: 100%
    height: 8vh

    &:before
      content ''
      background #ECF0F1

    &:after
      color #ECF0F1
      content attr( data-preview )
      font-size 1.3vh
      line-height 8vh

  .title,
  .preview
    text-align center
    text-transform uppercase
    position relative

    &:before,
    &:after
      width 100%
      height 100%
      display block
      position absolute
      top 0
      left 0
      transition clip-path 0.5s cubic-bezier( 0.455, 0.030, 0.515, 0.955 )

  .item--square
    .title,
    .preview
      &:before
        clip-path polygon( 0 0, 0 0, -50px 100%, 0 100% )

      &:hover
        &:before
          clip-path polygon( 0 0, calc( 100% + 50px ) 0, 100% 100%, 0 100% )

  .item--circle
    .title,
    .preview
      &:before
        clip-path circle(0% at 0% 50%)

      &:hover
        &:before
          clip-path circle(150% at 0% 50%)

  .item--triangle
    .title,
    .preview
      &:before
        clip-path polygon( 50% 100%, 0% calc( 100% + 50px ), 0% 200%, 100% 200%, 100% calc( 100% + 50px ) )
        transition-duration 0.4s

      &:hover
        &:before
          clip-path polygon( 50% -50px, 0% 0%, 0% 100%, 100% 100%, 100% 0% )

  .item--arrow
    .title,
    .preview
      &:before
        clip-path polygon( -20px 0%, 0px 50%, -20px 100%, -60px 100%, -40px 50%, -60px 0% )
        transition-duration 0.0s

      &:hover
        &:before
          clip-path polygon( calc( 100% + 40px ) 0%, calc( 100% + 60px ) 50%,  calc( 100% + 40px ) 100%, 100% 100%, calc( 100% + 20px ) 50%, 100% 0% )
          transition-duration 0.8s
              
            
!

JS

              
                
              
            
!
999px

Console