Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


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


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.


Save Automatically?

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.


                link href='|Codystar:300|Josefin+Sans:100' rel='stylesheet' type='text/css'

video autoplay='' muted='' loop=''
  source src="" type="video/mp4"
  source src="" type="video/webm"

  h1 Funky HTML5 FS video with hover overlay effect
  - for i in 0..2000


                @import compass

html, body, .overlay
  width: 100%
  height: 100%

  overflow: hidden
  margin: 0
  text-align: center

// I realize how messy this is, I'm exhausted. Shoot me.
  $spacesize: 60px
  $dim: $spacesize * 8
  position: absolute
  top: 50%
  left: 50%
  height: $dim - ($dim - $spacesize * 3) / 2
  width: $dim
  margin: -$dim / 2 0 0 #{-$dim / 2}
  padding-top: ($dim - $spacesize*3) / 2
  border: 1px dashed #afafa8
  +border-radius($dim / 2)
  font: 40px/#{$spacesize} 'Codystar', cursive
  color: #fffff8
  pointer-events: none
  height: auto
  width: 100%
  position: absolute
  top: 0
  left: 0
  height: 100%
  font-size: 0
  opacity: 1
  width: 5%
  margin: 0
  // omfg this is BRILLIANT thank you :D :D :D
  padding-bottom: 5%
  // (using padding so that we get a % of the width, not the height)
  display: inline-block
  background: #333
  +transition(opacity .7s)
    opacity: 0
    +transition(opacity 0s)


                $ () ->
  $window = $(window)
  $video = $('video')
  aspect = $video.height() / $video.width()
  fitVid = () ->
    h = $window.height()
    w = $window.width()
    if h / w > aspect
        'height': '120%'
        'width': 'auto'
        'margin-top': '-10%'
        'height': 'auto'
        'width': '120%'
        'margin-left': '-10%'
    load: fitVid
    resize: fitVid