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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                div.container <!--adjust position(not required) -->
  input.toggle#toggle(type="checkbox")
  label.toggle-label(for="toggle")
    span.toggle-icon
    span.toggle-text

              
            
!

CSS

              
                fontSize(n)
  font-size (n*10)px
  font-size (n)rem

subscript(content)
  position absolute
  width 100%
  left 0
  content content
  transition all 500ms ease-in-out

show()
  visibility visible
  opacity 1

hide()
  visibility hidden
  opacity 0

.toggle
  display none

.toggle-label
  cursor pointer
  display block
  width 45px
  height 45px
  user-select none
  -webkit-tap-highlight-color transparent

.toggle-label:active
  -webkit-tap-highlight-color transparent

.toggle-label
  cursor pointer
  .toggle-icon
  .toggle-icon:before
  .toggle-icon:after
    position relative
    display block
    height 3px
    width 32px
    background #5d809d
    transition all 500ms ease-in-out
  .toggle-text
    position relative
    display block
    top calc(100% - 14px)
    height 14px
    fontSize 0.8
    color #5d809d
    text-align center
    &:before
      subscript('MENU')
      show()
    &:after
      subscript('CLOSE')
      hide()

.toggle-label
  .toggle-icon
    top 50%
    left 50%
    transform translate3d(-50%, -5px, 0)
    &:before
      content ''
      transform translate3d(0, -10px, 0)
    &:after
      content ''
      transform translate3d(0, 7px, 0)

.toggle:checked ~ .toggle-label
  .toggle-icon
    background-color transparent
  .toggle-icon:before
  .toggle-icon:after
    top 0

.toggle:checked ~ .toggle-label
  .toggle-icon:before
    transform rotate(45deg)
  .toggle-icon:after
    transform translateY(-2px) rotate(-45deg)
  .toggle-text
    &:before
      hide()
    &:after
      show()

html
  // sets the base font to 10px for easier math
  font-size 62.5%

body
  font-size 1.4em
  font-family 'メイリオ','Hiragino Kaku Gothic Pro',Meiryo,'ヒラギノ角ゴ Pro W3','MS PGothic','MS UI Gothic',Helvetica,Arial,sans-serif

// adjust position(not required)
.container
  display flex
  align-items center
  justify-content center
  height 200px

              
            
!

JS

              
                
              
            
!
999px

Console