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="app">
  <div class="app__nav">
    <div>Home</div>
    <div>About</div>
    <div>Contact</div>
  </div>
  <div class="wrapper">
    <h1>Full Bleed</h1>
    <p>Based on:
      <a href="https://www.joshwcomeau.com/css/full-bleed/">https://www.joshwcomeau.com/css/full-bleed/</a>
    </p>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae, non nostrum alias suscipit, harum explicabo rerum officia et vel commodi, vero perspiciatis dolor! Sed voluptatum sapiente odio quibusdam culpa id.</p>
    <img src="https://picsum.photos/900/600" alt="" class="full-bleed">
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae, non nostrum alias suscipit, harum explicabo rerum officia et vel commodi, vero perspiciatis dolor! Sed voluptatum sapiente odio quibusdam culpa id. Lorem ipsum, dolor sit amet consectetur adipisicing elit. Saepe nam distinctio soluta neque, ad fugit quasi at magnam ab in voluptatem culpa officia sed minus cupiditate quod provident quaerat quisquam. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Facilis possimus nobis aut cumque alias, provident consequuntur fugit delectus sapiente dolor voluptatem, eius saepe modi porro temporibus. Voluptate enim eos fugit?</p>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Natus mollitia possimus, laboriosam optio vel eveniet veniam velit quae ducimus facere repellat quaerat porro nisi atque excepturi, illum ea commodi reiciendis.</p>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae, non nostrum alias suscipit, harum explicabo rerum officia et vel commodi, vero perspiciatis dolor! Sed voluptatum sapiente odio quibusdam culpa id. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nulla, placeat adipisci eos optio accusamus vero reprehenderit, cumque, ex sequi quibusdam natus. Sint ipsa eum dolorum deleniti quaerat, dolore eligendi itaque?</p>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae, non nostrum alias suscipit, harum explicabo rerum officia et vel commodi, vero perspiciatis dolor! Sed voluptatum sapiente odio quibusdam culpa id.</p>
  </div>
</div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

home,
body {
  height: 100%;
}
body {
  margin: 0;
  font-size: 20px;
  font-family: system-ui;
}

a {
  color: inherit;
}

@media (prefers-color-scheme: dark) {
  body {
    color: white;
    background-color: black;
  }
}

/* --- app layout and sidebar --- */

.app {
  display: flex;
  flex-direction: row;
}

.app__nav {
  flex-shrink: 0;
  padding: 1em;
  line-height: 1.5;
  width: 20ch;
  border-right: 1px solid;
  position: sticky;
  top: 0;
}

.app__nav {
  height: 100vh;
}

/* --- full bleed --- */

.wrapper {
  display: grid;
  grid-template-columns:
    1fr
    min(65ch, calc(100% - 2em))
    1fr;
  grid-column-gap: 1em;
}
.wrapper > * {
  grid-column: 2;
}
.wrapper .full-bleed {
  width: 100%;
  grid-column: 1 / 4;
}

              
            
!

JS

              
                
              
            
!
999px

Console