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

              
                .hatena_container
  .pen_body
    .pen_top
    .pen_bottom
              
            
!

CSS

              
                $size: 200px
$color: #2E2E2E
$pen_body_width: $size * 0.25
$pen_body_height: $size * 0.4
$pen_top_height: $size * 0.3
$width_offset: 0.11
$pen_top_width: $pen_body_width * (1 + ($width_offset * 2))
.hatena_container
  position: relative
  height: $size
  width: $size
  border: $size * 0.08 solid $color
  border-radius: 50%
  .pen_body
    border-top: $pen_body_height solid $color
    border-left: $size * 0.03 solid transparent
    border-right: $size * 0.03 solid transparent
    position: absolute
    top: 60%
    left: 50%
    transform: translate(-50%, -50%)
    width: $pen_body_width
    &:before, &:after
      z-index: 1
      content: ' '
      position: absolute
    &:before
      bottom: $pen_body_height * 0.8
      width: $pen_top_width * 0.20
      left: 50%
      transform: translateX(-50%)
      height: $pen_top_height * 1.5
      background: white
    &:after
      bottom: $pen_body_height * 0.8
      left: 50%
      width: $pen_top_width * 0.4
      height: $pen_top_width * 0.4
      transform: translate(-50%, 50%)
      background: white
      border-radius: 50%
  .pen_top
    display: inline-block
    position: absolute
    overflow: hidden
    bottom: $pen_body_height
    left: -$pen_body_width * $width_offset
    width: $pen_top_width
    height: $pen_top_height
    background: $color
    &:before, &:after
      position: absolute
      display: inline-block
      content: ' '
      background: white
      height: $pen_top_height * 10
      width: $pen_top_width * 1.5
      bottom: 0
      border-radius: 0 0 50% 50% / 0 0 100% 100%
    &:before
      left: 0
      transform: translateX(-50%)
    &:after
      right: 0
      transform: translateX(50%)
  .pen_bottom
    position: absolute
    top: 100%
    background: $color
    $height: $size * 0.05
    $width: $pen_body_width
    width: $width
    height: $height
    border-radius: 0 0 #{$width / 2} #{$width / 2} / 0 0 #{$height} #{$height}
              
            
!

JS

              
                
              
            
!
999px

Console