Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                
<div class="nested-scroller">
  <p>Sweet donut jujubes jelly croissant cookie. Sweet roll oat cake pudding powder marzipan donut toffee. Sesame snaps pastry tiramisu pie sugar plum cake marzipan gingerbread biscuit. Lemon drops soufflé bonbon gummies pastry.</p>
  <p>Pudding donut cake marzipan lemon drops sesame snaps. Pudding tiramisu chupa chups jelly beans cheesecake. Marzipan apple pie candy oat cake powder chocolate fruitcake cotton candy. Sesame snaps shortbread candy soufflé candy canes chocolate cake.</p>
  <p>Sesame snaps sesame snaps shortbread sweet pie caramels brownie. Marshmallow sweet roll bonbon croissant cotton candy fruitcake brownie pastry. Jelly-o soufflé toffee dragée powder carrot cake oat cake. Chocolate bar carrot cake halvah marzipan chocolate cake. Chocolate bar lemon drops icing gummies caramels marshmallow chocolate cake donut caramels. Tiramisu pastry chupa chups marzipan powder sweet roll tart. Topping sweet roll cake chocolate cake biscuit sugar plum. Jelly beans croissant jelly-o dragée tart jelly-o.</p>
</div>
              
            
!

CSS

              
                .nested-scroller {
  max-block-size: min(50vh, 20ch);
  max-inline-size: 35ch;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: white;
  box-shadow: inset 0 3px 10px var(--color-primary-dark);
  scrollbar-gutter: stable both-edges;
  padding: 10px;
}

body {
  min-block-size: 150vh;
  font-family: system-ui, sans-serif;
  background: var(--color-primary-x-light);
  display: grid;
  place-content: center;
  margin: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console