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="ten"></div>
              
            
!

CSS

              
                // #divtober 20: Ten
// a.singlediv.com/divtober2022

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

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

body
  min-height: 350px
  height: 100vh
  position: relative
  background-color: #222

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

  &::before,
  &::after
    display: block
    content: ''
    position: absolute
    
  @media (max-width: 400px)
    &:not(.no-scale)
      transform: scale(.8)

#ten
  box-sizing: border-box
  width: 250px
  height: @width
  margin-left: -(@width/2)
  margin-top: -(@height/2)
  background-repeat: no-repeat
  border-radius: 1em
  border: .15em solid white
  box-shadow: inset 0 0 0 .2em tomato,
              inset 0 0 1em .3em tomato,
              inset 1em 1em .4em black(.6),
              0 0 0 .2em tomato,
              0 0 1em .3em tomato,
              1em 1em .4em black(.6)

  &::before
    width: .15em
    height: 8em
    left: 28%
    top: 50%
    margin-top: -(@height/2)
    background-color: white
    border-radius: 1em
    box-shadow: 0 0 0 .2em tomato,
                0 0 1em .3em tomato,
                1em 1em .4em .2em black(.6)

  &::after
    box-sizing: border-box
    width: 4em
    height: 8.2em
    left: 48%
    top: 50%
    margin-top: -(@height/2 + .1em)
    border-radius: 2em
    border: .15em solid white
    box-shadow: inset 0 0 0 .2em tomato,
                inset 0 0 1em .3em tomato,
                inset 1em 1em .4em black(.6),
                0 0 0 .2em tomato,
                0 0 1em .3em tomato,
                1em 1em .4em black(.6)
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console