Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div id="hairy"></div>
              
            
!

CSS

              
                // #divtober 09: Hairy
// a.singlediv.com/divtober2020

black(alpha)
  rgba(0,0,0,alpha)

white(alpha)
  rgba(255,255,255,alpha)

body
  min-height: 340px
  height: 100vh
  position: relative
  background-color: #ccc
  text-align: center

div
  position: absolute
  left: 50%
  top: 50%

  &:before,
  &:after
    display: block
    content: ''
    position: absolute

#hairy
  font-size: 10px
  width: 25em
  height: 100%
  top: auto
  bottom: 0
  margin-left: -(@width/2 + 1em)
  background-repeat: no-repeat
  background-image: repeating-linear-gradient(to right, #999, #999  .4em,
                                                        transparent .4em,
                                                        transparent .7em),
                    repeating-linear-gradient(to right, #999, #999  .4em,
                                                        transparent .4em,
                                                        transparent .7em)
  background-size: 14em 100%,
                   25em calc(100% - 17em)
  background-position: 2em 0
  @media screen and (max-width: 450px)
    font-size: 8px

  &:before,
  &:after
    width: 30em
    height: 10em
    background-repeat: no-repeat

  &:before
    bottom: 11em
    background-image: linear-gradient(#333, #333),
                      linear-gradient(172deg, transparent 51%, #333 52%),
                      radial-gradient(ellipse at 100% 0, transparent 67%, #333 68%),
                      radial-gradient(circle, transparent 50%,
                                              #333 50.5%,
                                              #333 63%,
                                              transparent 63.5%),
                      linear-gradient(white, white)
    background-size: 24em .5em,
                     58% 2.5em,
                     15% 2.5em,
                     7em 7em,
                     24em .5em
    background-position: 0 50%,
                         0 calc(50% - 1.45em),
                         68% calc(50% - 1.4em),
                         100% 50%,
                         0 calc(50% + .2em)
    transform: rotate(19deg)
    z-index: -1

  &:after
    bottom: 12em
    background-image: radial-gradient(circle, white 50%,
                                              white(0) 50.5%),
                      linear-gradient(#333, #333),
                      linear-gradient(8deg, transparent 51%, #333 52%),
                      radial-gradient(ellipse at 100% 100%, transparent 67%, #333 68%),
                      radial-gradient(circle, transparent 50%,
                                              #333 50.5%,
                                              #333 63%,
                                              transparent 63.5%),
                      linear-gradient(white, white)
    background-size: 1.4em 1.4em,
                     24em .5em,
                     58% 2.5em,
                     15% 2.5em,
                     7em 7em,
                     24em .5em
    background-position: 54% calc(50% + 1em),
                         0 50%,
                         0 calc(50% + 1.45em),
                         68% calc(50% + 1.4em),
                         100% 50%,
                         0 calc(50% - .2em)
    transform: rotate(-19deg)
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console