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

CSS

              
                // #divtober 27: Film
// a.singlediv.com/divtober2021

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

body
  min-height: 250px
  height: 100vh
  position: relative
  background-color: black

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

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

#film
  box-sizing: border-box
  font-size: 10px
  width: 34em
  height: 5em
  margin-left: -(@width/2)
  margin-top: 2em

  &:before
    top: -5.5em
    left: 1.2em
    background-image: repeating-linear-gradient(to right, white,
                                                          white 2em,
                                                          white(0) 2em,
                                                          white(0) 4em),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent)
    background-size: 100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%
    background-position: 0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0
    transform: rotate(0deg) skew(25deg)
    animation: -2s filmclap 8s infinite linear, -2s filmclapbg1 8s infinite steps(1)
    transform-origin: bottom left

  &:after
    background-image: repeating-linear-gradient(to right, white,
                                                          white 2em,
                                                          white(0) 2em,
                                                          white(0) 4em),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent),
                      linear-gradient(transparent,transparent)
    background-size: 100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%,
                     100% 100%, 100% 100%
    background-position: 0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0,
                         0 0, 0 0
    transform: skew(-25deg)
    animation: -2s filmclapbg2 8s infinite steps(1) both

@keyframes filmclap
  0%, 45%
    transform: rotate(0deg) skew(25deg)
  50%, 51%
    transform: rotate(-32deg) skew(25deg)
  52%, 93%
    transform: rotate(0deg) skew(25deg)
  98%, 99%
    transform: rotate(-32deg) skew(25deg)
  100%
    transform: rotate(0deg) skew(25deg)

@keyframes filmclapbg1
  0%, 51.999999%
    background-image: repeating-linear-gradient(to right, white,
                                                          white 2em,
                                                          white(0) 2em,
                                                          white(0) 4em)
  52%, 100%
    background-image: linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient( 110deg, white(0) 26%, white 27%,
                                               white 65%, white(0) 66%),
                      linear-gradient(-110deg, white(0) 26%, white 27%,
                                               white 65%, white(0) 66%),
                      linear-gradient(white, white),
                      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 2em,
                                                          white(0) 2em,
                                                          white(0) 4em)
    background-size: 3.1em 1.2em, 1.5em 100%,
                     1.5em 100%, 1.5em 70%, 1.5em 70%, 1.5em 100%,
                     4.8em 1.2em, 1.5em 100%,
                     1.5em 100%, 3em 1.5em, 1.5em 100%,
                     12em 100%
    background-position: 100% 100%, 29.5em 0,
                         27.3em 0, 25.9em 0, 24.7em 0, 23.4em 0,
                         17.8em 0, 19.4em 0,
                         12em 0, 13em 50%, 15.5em 0,
                         0 0

@keyframes filmclapbg2
  0%, 51.999999%
    background-image: repeating-linear-gradient(to right, white,
                                                          white 2em,
                                                          white(0) 2em,
                                                          white(0) 4em)
  52%, 100%
    background-image: linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      linear-gradient(white, white),
                      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 2em,
                                                          white(0) 2em,
                                                          white(0) 4em)
    background-size: 4em 1.2em, 4em 1em, 4em 1.2em, 1.5em 50%, 1.5em 50%,
                     4em 1.2em, 4em 1em, 4em 1.2em, 1.5em 50%, 1.5em 50%,
                     4em 1.2em, 1.5em 100%, 4em 1.2em,
                     20em 100%
    background-position: 100% 0, 100% 50%, 100% 100%, 30em 0, 100% 100%,
                         25em 0, 25em 50%, 25em 100%, 25em 0, 27.5em 100%,
                         20em 0, 20em 0, 20em 100%,
                         0 0
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console