Pen Settings



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


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.


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.


    %h2 Menu
      - 60.times do
        %li menu

  %button.toggle-button ☰
    %h2 Contents
    - 20.times do
      %p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum cupiditate culpa corrupti adipisci ex ullam, quis quaerat! Distinctio et ratione quam aut voluptatem dolor, adipisci nisi aspernatur laboriosam rem nulla.



                .slideout-menu {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 0;
  width: 256px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;

.slideout-panel {
  position: relative;
  z-index: 1;
  will-change: transform;

.slideout-open body,
.slideout-open .slideout-panel {
  overflow: hidden;

.slideout-open .slideout-menu {
  display: block;

// base settings
body {
  width: 100%;
  height: 100%;

nav {
  background: #000;
  color: #fff;
  padding: 3rem;

main {
  background: #eee;
  min-height: 100%;
  padding: 3rem 4rem;

header {
  padding: 1rem;
  position: fixed;
  width: 100%;
  z-index: 10;

// .fixd sample
.fixed {
  backface-visibility: hidden;
  position: fixed;
  transition: transform 300ms ease;

.fixed-open {
  transform: translate3d(256px, 0px, 0px);


  Slideout.js: スライドするナビゲーションメニュー | deadwood

var slideout = new Slideout({
  'panel': document.getElementById('panel'),
  'menu': document.getElementById('menu'),
  'padding': 256,
  'tolerance': 70

// Toggle button
document.querySelector('.toggle-button').addEventListener('click', function() {

// .fixd sample
slideout.on('beforeopen', function() {

slideout.on('beforeclose', function() {