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.


                //- All Thanks to Holy Javascript and me

//- Core code for all mixins, you must put this code in some file and include on you need

mixin mixin-block(name)
  //- this mixin set named block data to some global scope
  - global.maxinData = global.maxinData || {}
  - global.mixinCallId = global.mixinCallId || 0
  - global.maxinData[global.mixinCallId] = global.maxinData[global.mixinCallId] || {}
  if block
    - global.maxinData[global.mixinCallId][name] = () => block()

mixin mixin-block-exists(name)
  //- Checking if named data exists and displaying block
  - global.maxinDataExists = global.maxinDataExists || function(name) { return global.maxinData !== undefined && global.maxinData[global.mixinCallId] !== undefined && global.maxinData[global.mixinCallId][name] !== undefined; }
  if block && global.maxinDataExists(name)
mixin mixin-block-get(name)
  //- Displaying block if exists
  if global.maxinData !== undefined && global.mixinCallId !== undefined
    if global.maxinData[global.mixinCallId]
      if global.maxinData[global.mixinCallId][name]
        - global.maxinData[global.mixinCallId][name]()

mixin mixin-next
  //- Switching to next
  - global.mixinCallId = (global.mixinCallId || 0) + 1;
//- End of core code

//- Example of usage

//- Let put all together and create some mixin
mixin title-block
  //- Important! We have to execute out block code first
  //- Wrappers goes there if you need them
    //- Checking if named block data exists
        //- Displaying block data
  //- Important! Switching helps to avoid data overlaping
//- Using our mixin

  //- Avoid using tags for wrapping content, use only named blocks
    | Blabl title 1
    | Blabla sub title 1

    | Blabl title 2

    | Blabla sub title 3


                .title-block {
  margin: 15px;
  padding: 15px;
  border: 1px dashed lightgrey;