Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <section>
  <h1 class="full-line">Main title</h1>
  <p>Dragée powder bear claw tiramisu pudding gummi bears wafer. Macaroon chocolate cake cake marzipan icing carrot cake macaroon sweet. Lemon drops </p>
</section>
<section>
  <h2>Secondary title</h2>
  <p >Pie pastry macaroon candy tootsie roll jujubes pudding pie. Jelly-o chocolate cake pastry gingerbread brownie danish liquorice chocolate cake. Jelly beans donut cupcake danish croissant liquorice. Cotton candy brownie croissant pie toffee. Cotton candy chocolate cake gummi bears ice cream jelly fruitcake caramels. Shortbread ice cream bear claw gingerbread chocolate cake jelly-o cake caramels soufflé.</p>
</section>
<section>
  <h2>Another title</h2>
  <p>Pie pastry macaroon candy tootsie roll jujubes pudding pie.</p>
</section>

<section>
  <blockquote>Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia quia tenetur fugit ut dignissimos officiis quibusdam, aliquid, nulla atque dicta inventore excepturi quod reiciendis nobis nihil amet ducimus quae quaerat.</blockquote>
</section>

<section>
  <blockquote class="whynot">Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia quia tenetur fugit ut dignissimos officiis quibusdam, aliquid, nulla atque dicta inventore excepturi quod reiciendis nobis nihil amet ducimus quae quaerat.</blockquote>
</section>
              
            
!

CSS

              
                .full-line {
  padding: 1rem 0;
  
  /*
  Credit to https://twitter.com/ChallengesCss/status/1537394975066972161
  This is the one linear that doing the magic, it's a shorthand so I'll explain it just below and use it in the following examples... https://developer.mozilla.org/en-US/docs/Web/CSS/border-image */
  
  /******
  border-image: linear-gradient(#10a1da,#10a1da) fill 0//0 100vw 0 50px;
  *******/
  
  
  /* border-image-source use... an image, we don't have any so we create one with linear-gradient, this one is a gradient with one color, so it's just plain #10a1da */
  border-image-source: linear-gradient(#10a1da,#10a1da);
  
  /* We don't care about the slicing of our image but we want to use it as a background image
  https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice
  */
  border-image-slice: 0 fill;
  
  /* Where do we extend that border-image-source?
  https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-outset
  top | right | bottom | left */
  border-image-outset: 0 100vw 0 50px;
  
}


section {
  /* center + max-width:800px + min-margin: 10px */
  margin-inline: max(10px, 50% - 800px/2);
  margin-block: 50px; 
}
body {
  font-family: system-ui, sans-serif;
  background: #fef8f5;
}
h1 {
  font-size: 3rem;
  color: #fef8f5;
}
h2 {
  margin: 0;
  padding: 1rem 0;
  color: #fef8f5;
  border-image: linear-gradient(90deg,#053547 60%,transparent 90%) fill 0//0 50px 0 100vw;
}
p {
  padding: 1.5rem 0;
  font-size: 1.5rem;
  text-align: justify;
  border-image: linear-gradient(#fcddd0,#fcddd0) fill 0//0 50px 0 100vw;
}

blockquote {
  margin: 0;
  padding: 1.5rem 0;
  font-size: 1.5rem;
  text-align: justify;
  border-image: linear-gradient(#b8e7fa,#b8e7fa) fill 0//0 100vw 0 100vw;
}
blockquote.whynot {
  border-image: linear-gradient(90deg,#10a1da 50%,#b8e7fa 50%,#b8e7fa 100%) fill 0//0 100vw 0 100vw;
}
              
            
!

JS

              
                
              
            
!
999px

Console