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

CSS

              
                // #divtober 07: Toxic
// a.singlediv.com/divtober2021

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

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

$toxic = rebeccapurple
$toxic-drk = midnightblue

body
  min-height: 300px
  height: 100vh
  position: relative
  background-color: $toxic

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

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

#toxic
  width: 24em
  height: 15em
  margin-left: -(@width/2)
  margin-top: -(@height/2)
  background-repeat: no-repeat
  background-image: linear-gradient(white, white),
                    linear-gradient(white, white),
                    linear-gradient(175deg, white(0) 30%, white(.4) 31%,
                                            white(.4) 70%, white(0) 71%),
                    linear-gradient(to right, white 2px,
                                              $toxic-drk 2px,
                                              $toxic-drk 7%,
                                              black(0) 7.1%),
                    linear-gradient(to left,  white 2px,
                                              $toxic-drk 2px,
                                              $toxic-drk 7%,
                                              black(0) 7.1%),
                    linear-gradient(95deg, white(.3) 38%, white(0) 39%),
                    linear-gradient(-95deg, white(.3) 38%, white(0) 39%),
                    repeating-linear-gradient(to right, white, white 2px,
                                                               white(0) 2px,
                                                               white(0) 4px),
                    linear-gradient(white, white),
                    linear-gradient(white, white),
                    linear-gradient(white, white),
                    linear-gradient(white, white),
                    linear-gradient(white, white),
                    repeating-linear-gradient(to right, white, white 2px,
                                                               white(0) 2px,
                                                               white(0) 4px),
                    linear-gradient(white, white),
                    repeating-linear-gradient(to right, white, white 2px,
                                                               white(0) 2px,
                                                               white(0) 4px),
                    linear-gradient(white, white),
                    linear-gradient(50deg, white(0) 34%, white 35%),
                    linear-gradient(-50deg, white(0) 34%, white 35%),
                    radial-gradient(circle at 50% 0, white(0) 54%,
                                                     white 55%,
                                                     white 57%,
                                                     white(0) 58%),
                    linear-gradient(white, white),
                    linear-gradient(white, white),
                    linear-gradient(white(.3), white(.3)),
                    linear-gradient(to right,  white 2px,
                                              $toxic-drk 2px,
                                              $toxic-drk 15%,
                                              black(0) 15.1%,
                                              white(0) 30%,
                                              white(.3) 31%,
                                              white(.3) 45%,
                                              white(0) 46%),
                    linear-gradient(to left,  white 2px,
                                              $toxic-drk 2px,
                                              $toxic-drk 15%,
                                              black(0) 15.1%)

  background-size: 10.7em 4px, 10.7em 4px,
                   10em 12em, 10em 12em, 10em 12em,
                   .8em 12em, .8em 12em,
                   2.4em 1em, 2.4em 2px, 2px 1.5em, 2px 1.5em, 2px 1.5em, 1.5em 2px,
                   1.4em 1em, 1.4em 2px,
                   1em .6em, 1.3em 2px,
                   1.3em 1em, 1.3em 1em,
                   6em 4em, 6em 2px, 6em 2px, 6em 3em, 6em 6em, 6em 6em
  background-position: left 9.7em bottom 1em, 9.7em 1.8em,
                       left 10em bottom 1em, left 10em bottom 1em, left 10em bottom 1em,
                       11.2em 2.4em, 18em 2.4em,
                       11em 1em, 11em 1em, 15em .5em, 15.75em .5em, 16.5em .5em, 15em .5em,
                       right 1.4em bottom 6.1em, right 1.4em bottom 7.1em,
                       left .7em bottom 1em, left .5em bottom 1em,
                       left 0 bottom 1.5em, left .95em bottom 1.5em,
                       3em 81%, left 3em bottom 6em, 3em 100%, 3em 90%, 3em 100%, 3em 100%


  &:before
    width: 4em
    height: 6em
    bottom: 0
    right: 0
    background-color: $toxic
    background-repeat: no-repeat
    background-image: linear-gradient(white, white)
    background-size: 45% 30%
    background-position: 50% 50%
    border: 2px solid white
    border-radius: 3em 3em 0 0
    box-shadow: inset 0 -.2em 0 white,
                inset 0 -.5em 0 $toxic-drk,
                inset .4em 0 0 $toxic-drk,
                inset -.4em 0 0 $toxic-drk,
                inset .8em -.1em 0 white(.3),
                inset -.8em -.1em 0 white(.3)

  &:after
    width: 2em
    height: 5em
    bottom: 2em
    background-repeat: no-repeat
    background-image: linear-gradient(white(.3), white(.3)),
                      radial-gradient(ellipse at 100% 0%, transparent 60%, $toxic-drk 61%)
    background-size: 100% 40%,
                     100% 100%
    background-position: 50% 50%,
                         0 100%
    border: 2px solid white
    border-top-width: 10px
    border-bottom-right-radius: 1em .6em
    border-bottom-left-radius: 1em .6em
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console