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.


                <button type="button">Toggle grid</button>

<article class="s-post">
  <small>Jul 20, 2017</small>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus atque magnam cum laudantium animi eius minus odio porro cumque! <a href="#">Maxime laboriosam odio</a> expedita quo ducimus ipsum adipisci eos, a sunt!</p>
  <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Iste qui laboriosam, libero animi ipsa quidem ea alias unde exercitationem vel culpa pariatur recusandae molestiae assumenda. Voluptatum, iure. Incidunt, esse reprehenderit!</p>
    <img src="" alt="Pupper">
    <figcaption><strong>Pupper</strong><p>Soon to be doggo</p></figcaption>
  <p>Lorem ipsum dolor sit amet consectetur <a href="#">adipisicing elit</a>. Eos esse rem quos eaque architecto deserunt illo perferendis aliquam consectetur, assumenda illum unde non temporibus aspernatur perspiciatis tempore recusandae vitae magni?</p>
  <small><em>&ndash; <a href="">Bobby Showalter</a></em></small>


                html {
  background-color: lavender;
  box-sizing: border-box;
  color: #404040;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
  font-size: 1.25em;
  line-height: 1.5;
  padding: 1rem;

*::after {
  box-sizing: inherit;

.s-post {
  background-color: rgba(255, 255, 255, .75);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(150,150,150, .5);
  margin: 0 auto;
  max-width: 60rem;
  padding: 1rem;

.s-post.grid {
  display: grid;
    [full-start] 1fr
    [main-start] minmax(0, 50ch) [main-end]
    1fr [full-end];

.s-post > *:first-child {
  margin-top: 0;

.s-post > *:last-child {
  margin-bottom: 0;

.s-post > * {
  grid-column: main;

.s-post h1 {
  color: rebeccapurple;

.s-post small {
  opacity: .5;

.s-post a {
  color: #2d1cfe;

.s-post figure {
  background-color: lavender;
  border: 4px solid indigo;
  border-radius: 3px;
  display: flex;
  flex-wrap: wrap;
  grid-column: full;
  margin: 1.5rem 1rem;

.s-post figure img {
  flex: 1 0 auto;
  max-width: 100%;
  object-fit: cover;

.s-post figure figcaption {
  color: rebeccapurple;
  flex: 1 1 11.391rem;
  padding: 1rem;

.s-post figure figcaption > *:last-child {
  margin-bottom: 0;

button {
  background-color: #dc3a00;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(50, 50, 50, .25);
  color: white;
  display: inline-block;
  padding: .5em 1em;
  position: fixed;
  bottom: .5rem;
  right: .5rem;
  text-shadow: 0 1px 3px rgba(25, 25, 25, .25);


                document.querySelector('button').addEventListener('click', () => {