cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - 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.

            
              <div class="g-container">
  <article class="features">
    <h3 class="features__title">Feature Title</h3>
    <p class="features__subtitle">Feature Subtitle</p>
    <div class="features__content">
      <p class="features__paragraph">Here is some text about the feature</p>
    </div>
    <ul class="features__list">
      <li>a feature item</li>
      <li>a feature item</li>
    </ul>
    <a href="" class="features__link">call to action</a>
  </article>
    <article class="features">
    <h3 class="features__title">Feature Title</h3>
    <p class="features__subtitle">Feature Subtitle</p>
    <div class="features__content">
      <p class="features__paragraph">Here is some text about the feature</p>
    </div>
    <ul class="features__list">
      <li>a feature item</li>
      <li>a feature item</li>
    </ul>
    <a href="" class="features__link">call to action</a>
  </article>
</div>



            
          
!
            
              :root {
  --inner-grid-columns: 8;
}

/* 
 * to start with there is no 'grid' just a single column 
 */

.g-container {
  padding: 0 .75em;
}

/*
 * when we get to 700px we create an 8 column grid with
 * a left and right area to breakout of the grid.
 */ 
@supports (display: grid) {
  @media (min-width: 700px) {
    .g-container {
      display: grid;
      grid-gap: .75em;
      grid-template-columns:
      [full-start] 
        minmax(calc(calc(100% - 1008px) / 2), 1fr)
          [main-start] 
            repeat(var(--inner-grid-columns), [col-start] 1fr)
          [main-end]
        minmax(calc(calc(100% - 1008px) / 2), 1fr)
      [full-end];
      padding: 0;
    }
  }
}

/*
 * when we get to 1100px we create an 14 column grid with
 * a left and right area to breakout of the grid.
 */ 
@supports (display: grid) {
  @media (min-width: 1100px) {
    .g-container {
      --inner-grid-columns: 14;
    }
  }
}

.features {
  grid-column: col-start 1 / span 6;
  --features-grid-columns: 5;
}

@supports (display: grid) {
  @media (min-width: 700px) {
    .features {
      display: grid;
      grid-auto-rows: min-content;
      grid-template-columns: repeat(var(--features-grid-columns), [col-start] 1fr);
      height: 100vh;
    }
  }
}

@supports (display: grid) {
  @media (min-width: 1100px) {
    .features {
      grid-column-end: 9;
      --features-grid-columns: 7;
    }
  }
}


.features [class*="title"]  {
  grid-column: col-start 2 / span 6;
}
.features [class*="subtitle"] {
  grid-column: col-start 2 / span 5;
}
.features [class*="content"] {
  grid-column: col-start 2 / span 4;
}
.features [class*="list"] {
  grid-column: col-start 2 / span 4;
}
.features [class*="link"]  {
  grid-column: col-start 5 / span 3;
}

.features:nth-of-type(even) [class*="title"]  {
  grid-column-start: col-start 1;
}
.features:nth-of-type(even) [class*="subtitle"]  {
  grid-column-start: col-start 1;
}
.features:nth-of-type(even) [class*="content"]  {
  grid-column-start: col-start 3;
}
.features:nth-of-type(even) [class*="list"]  {
  grid-column-start: col-start 3;
}
.features:nth-of-type(even) [class*="link"]  {
  grid-column-start: col-start 1;
}

.features:nth-of-type(even) {
  grid-column-start: 4;
  grid-row: 2;
  grid-template-areas:
}

@supports (display: grid) {
  @media (min-width: 1100px) {
    .features:nth-of-type(even) {
      grid-column-start: 9;
      grid-column-end: 16;
    }
  }
}

// example styles

html {
  font-family: 'Fira Sans', sans-serif;
}

.g-container {
 background-color: darkgrey; 
}

            
          
!
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