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.


                <div class="container">
  <button class="btn" id="button">Activate Modal</button>

<div class="modal">
  <div class="modal--body">This is a modal dialog box that blurs the page behind it.</div>


                @import bourbon

  position: relative
  height: 100%
  background: url('')
  background-repeat: no-repeat
  background-size: cover
  background-position: top center
    background-color: red
  filter: blur(3px)

  +position(absolute, 50% null null 50%)
  +transform(translate(-50%, -50%))
  padding: 20px
  border-radius: 3px
  border: 0
  font-family: helvetica, sans-serif
  color: #fff
  background: #00BCD4
  box-shadow: 0px 3px 3px darken(#00BCD4, 20%)
  outline: 0
  cursor: pointer
    +transform(translate(-50%, -48%))
    outline: 0
    box-shadow: 0px 1px 3px darken(#00BCD4, 20%)
  +position(absolute, 0 0 0 0)
  background-color: transparent
  display: none
  display: block
  cursor: pointer  
  +position(absolute, 50% null null 50%)
  +transform(translate(-50%, -50%))
  width: 40%
  height: 200px
  padding: 30px
  background-color: #fff
  border-radius: 3px
  font-family: helvetica, sans-serif
  font-weight: thin
  font-size: 16px
  text-align: center

html, body
  height: 100%


  $('#button').on('click', function(){
    $('.modal').on('click', function(){