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

              
                .box
  .chia-checkbox
    input(type='checkbox' id='checkbox' checked)
    label(for='checkbox')
  label(for='checkbox') 我願意。
              
            
!

CSS

              
                $primary: #24a6e3
$cb-size: 24px

.chia-checkbox
  display: inline-block
  margin-right: .5rem
  width: $cb-size
  height: $cb-size
  position: relative
  input
    visibility: hidden
    &:checked + label
      background-color: $primary
      border-color: $primary
      &:hover
        opacity: .8
      &:after
        border-color: #fff
  label
    display: block
    width: $cb-size
    height: $cb-size    
    position: absolute
    left: 0
    top: 0
    background-color: rgba(0,0,0,.08)
    border: 1px solid rgba(0,0,0,.12)
    border-radius: $cb-size/12
    box-sizing: border-box
    cursor: pointer
    transition: .4s
    &:hover
      background-color: rgba(0,0,0,.04)
      border-color: rgba(0,0,0,.24)
      &:after
        border-color: rgba(0,0,0,.24)
    &:after
      display: block
      content: ''
      position: absolute
      width: $cb-size/2
      height: $cb-size/4
      top: 50%
      left: 50%
      border: $cb-size/12 solid rgba(0,0,0,.12)
      border-top: none
      border-right: none
      transform: rotate(-45deg) translate(0%, -110%)
      transition: .2s
    
// just for layout
body
  position: absolute
  width: 100%
  height: 100%
  overflow: hidden
.box
  position: relative
  display: table
  margin: 0 auto
  top: 50%
  transform: translateY(-50%)
              
            
!

JS

              
                
              
            
!
999px

Console