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

CSS

              
                // #divtober 05: Tired
// a.singlediv.com/divtober2021

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

body
  min-height: 300px
  height: 100vh
  position: relative
  background-color: gold
  text-align: center

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

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

#tired
  box-sizing: border-box
  width: 13em
  height: @width
  margin-left: -(@width/2)
  margin-top: -(@height/2)
  background-repeat: no-repeat
  background-image: radial-gradient(ellipse at 50% 0%, alpha(crimson,.5) 50%,
                                                       alpha(crimson, 0) 55%),
                    radial-gradient(ellipse at 50% 0%, darkorange 50%,
                                                       alpha(darkorange, 0) 51%),
                    radial-gradient(ellipse at 50% 0%, alpha(crimson,.5) 50%,
                                                       alpha(crimson, 0) 55%),
                    radial-gradient(ellipse at 50% 0%, darkorange 50%,
                                                       alpha(darkorange, 0) 51%),
                    radial-gradient(ellipse, darken(sienna, 10) 45%,
                                             darken(saddlebrown, 15) 66%,
                                             alpha(saddlebrown, 0) 68%),
                    radial-gradient(circle at 50% 10%, lemonchiffon, gold 40%, darkorange 80%)
  background-size: 5.8em 4em,
                   5.8em 6em,
                   5.8em 4em,
                   5.8em 6em,
                   2em 1.5em,
                   100% 100%
  background-position: left  .7em top 6.5em,
                       left  .7em top 6.5em,
                       right .7em top 6.5em,
                       right .7em top 6.5em,
                       50% 85%,
                       0 0
  border-radius: 50%
  border: .2em solid darkorange
  box-shadow: inset 0 1.4em .5em -1em alpha(gold, .9),
              inset 0 0 0 .3em alpha(crimson, .2),
              inset 0 -.6em 1em .5em alpha(darkred,.4)

  &:before,
  &:after
    width: 4.6em
    height: @width
    top: 3.9em
    background-color: white
    background-repeat: no-repeat
    background-image: linear-gradient(to bottom, lemonchiffon, gold, orange),
                      linear-gradient(saddlebrown 80%, alpha(saddlebrown, 0) 100%),
                      radial-gradient(circle, black 60%, black(0) 62%),
                      radial-gradient(circle, black(0) 60%, black(.4) 75%),
                      radial-gradient(circle, white 48%, tomato 75%)
    background-size: 100% 55%,
                     100% 60%,
                     1.3em 1.3em,
                     100% 100%,
                     100% 100%
    background-position: 0 0,
                         0 0,
                         50% 62%,
                         0 0,
                         0 0
    border-radius: 50%
    box-shadow: 0 -1em 1em 0 alpha(crimson, .1)

  &:before
    left: 1.3em

  &:after
    right: 1.3em
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console