cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <header>
  <hgroup class="Container">
    <h1>Site Title</h1>
    <h2>Donec id elit non mi porta.</h2>
  </hgroup>
</header>

<main class="Container">
  <div class="Grid">
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
      <a href="#">View details &raquo;</a>
    </section>
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
      <a href="#">View details &raquo;</a>
   </section>
    <section class="Grid-cell">
      <h2>Heading</h2>
      <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
      <a href="#">View details &raquo;</a>
    </section>
  </div>
</main>

            
          
!
            
              :root { --gutter: 1.5em; }
@media (min-width: 30em) {
  :root { --gutter: 2em; }
}
@media (min-width: 48em) {
  :root { --gutter: 3em; }
}

.Container {
  margin: 0 auto;
  max-width: 60em;
  padding: var(--gutter);
}

.Grid {
  --gutterNegative: calc(-1 * var(--gutter));
  margin-left: var(--gutterNegative);
  margin-top: var(--gutterNegative);
}

.Grid-cell {
  margin-left: var(--gutter);
  margin-top: var(--gutter);
}

@media (min-width: 48em) {
  .Grid {
    display: flex;
  }
  .Grid-cell {
    flex: 1;
  }
}


/* The styles below aren't relevant to the demo. */

* {
  font: inherit;
  margin: 0;
  padding: 0;
}

body {
  color: #333;
  font: 1em/1.25 'Helvetica Neue', sans-serif;
}

header {
  background-color: hsl(30, 15%, 95%);
}

h1 {
  font-size: 3em;
  line-height: 1;
  margin: .25em 0;
}

@media (min-width: 48em) {
  h1 {
    font-size: 4em;
  }
}

h2 {
  font-size: 1.5em;
}

p {
  margin: 1em 0;
}

a {
  color: hsl(165, 60%, 40%);
}
            
          
!
            
              function supportsCSSCustomProperties() {
  var div = document.createElement('div');
  div.style.setProperty('--width', '1%');
  return div.style.getPropertyValue('--width') == '1%';
}

if (!supportsCSSCustomProperties()) {
  alert('Sorry! Your browser does not support CSS Custom Properties.');
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console