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.


                <img src="" role="presentation" />
<h1>I need container queries!</h1>
  <dt>Have you considered another design aspect that doesn't require queries?</dt>
    <dd><strong>No:</strong> Try this first, there may be a manner in which you can solve the same problem without needing any container query approach.</dd>
    <dd><strong>Yes:</strong> Move onto the next item</dd>
  <dt>Is the container you're querying always a specific percentage to the viewport?</dt>
    <dd><strong>Yes:</strong> Then use a media query</dd>
    <dd><strong>No:</strong> Move on to the next item</dd>
  <dt>Does the query depend on its child's size?</dt>
    <dd><strong>No:</strong> Move on to the next item</dd>
    <dd><strong>Yes:</strong> Move to <a href="#will-your-query" title="Navigate to the next item">this item</a></dd>
  <dt>Does your container need access to the parent document (eg: access to CSS custom properties within that document)?</dt>
    <dd><strong>No:</strong> Use an iframe</dd>
    <dd><strong>Yes:</strong> Move on to the next item</dd>
  <dt id="will-your-query">Will your query change layout</dt>
    <dd><strong>No:</strong> Move to the <a href="#overflow" title="Move to the next item">this item</a></dd>
    <dd><strong>Yes:</strong> Try to use modern layout such as Grid or Flexbox</dd>
  <dt>Did the modern layout work?</dt>
    <dd><strong>No:</strong> Move to the next item</dd>
    <dd><strong>Yes:</strong> Sweet!</dd>
  <dt id="overflow">Is the scenario primarily impacted by content overflowing?</dt>
    <dd><strong>Yes:</strong> Then use the IntersectionObserver technique</dd>
    <dd><strong>No:</strong> Then use resizeObserver</dd>


                body {
  background: #333;
  display: grid;
  color: white;
  font-family: "Segoe UI Light", Arial, Verdana, sans-serif;
  justify-items: center;

a:link {
  color: lime;