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="page-wrapper">

  <h1>Web Accessible Modal Window with Magnific Popup</h1>
  <p>This is an example of how to create an accessible modal window using the Magnific Popup plugin</p>

  <button data-mfp-src="#mymodal" class="modal-btn">Modal Popup</button>

<div id="mymodal" class="mfp-hide" role="dialog" aria-labelledby="modal-title" aria-describedby="modal-content">
  <h1 id="modal-title" class="modal-title" tabindex="0">This is My Modal Title</h1>
  <div id="modal-content">

    <p>Making modals is fun! Your favorite flavor of ipsum goes right here.</p> 




                // Styling the Modal window
#mymodal {
  position: relative;
  background-color: #FFF;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;                

// extra styling
.page-wrapper {
  text-align: center;

button.modal-btn {
  border: 1px solid steelblue;
  background: #FFF;
  color: steelblue;
  padding: 10px 20px;
  font-size: 16px;
  &:hover {
     background: steelblue;
    color: #FFF;

.mfp-close:focus {
  border: 1px solid steelblue;


                $(document).ready(function() {  
    autoFocusLast: true,