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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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-template-columns: repeat(var(--features-grid-columns), [col-start] 1fr);
      grid-template-areas:
        ". title     title     title     title     title    title"
        ". subtitle  subtitle  subtitle  subtitle  subtitle .    "
        ". content   content   content   content   .        .    "
        ". list      list      list      .         .        .    "
        ". .         .         .         link      link     link ";
    }
  }
}

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

.features__title { grid-area: title; }
.features__subtitle { grid-area: subtitle; }
.features__content { grid-area: content; }
.features__list { grid-area: list; }
.features__link { grid-area: link; }

.features:nth-of-type(even) {
  grid-column-start: 4;
  grid-row: 2;
  grid-template-areas:
    "title     title     title     title     title    title   ."
    "subtitle  subtitle  subtitle  subtitle  subtitle .       ."
    ".         .         content   content   content  content ."
    ".         .         .         list      list     list    ."
    "link      link      link      .         .        .       .";
}

@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
Loading ..................

Console