Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="hero">
  <h1 class="main__title hero__title">Subgrid is what grid was meant to be</h1>
  <img class="hero__img" src="https://images.unsplash.com/photo-1517938021627-eec2bbe94dcd?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ" alt="" class="hero-img">
  <div class="hero__body">
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. </p>
    <a class="btn" href="#">More info</a>
  </div>
</div>

<div class="sales-points">
  <div class="sales-points__sales-point">
    <h2 class="sales-points__title">Easier</h2>
    <p class="sales-point__body">Lorem ipsum dolor sit amet consectetur adipisicing.</p>
  </div>
  <div class="sales-points__sales-point">
    <h2 class="sales-points__title">Faster</h2>
    <p class="sales-point__body">Delectus perferendis doloribus mollitia quibusdam facere eius!</p>
  </div>
  <div class="sales-points__sales-point">
    <h2 class="sales-points__title">Consistent</h2>
    <p class="sales-point__body">Nostrum possimus, porro ipsam iure soluta est!</p>
  </div>
</div>

<div class="cta">
  <h2 class="cta__title"><span>It might not seem like such a big deal at first, but</span> it's a game changer</h2>
  <div class="cta__point">
    <svg class="cta__img" viewBox="0 0 24 24"> <path d="M11,6.5V9.33L8.33,12L11,14.67V17.5L5.5,12M13,6.43L18.57,12L13,17.57V14.74L15.74,12L13,9.26M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" /> </svg>
    <h3 class="cta__subtitle">Starter</h3>
    <ul class="cta__list">
      <li>one one</li>
      <li>two</li>
      <li>three three three three</li>
      <li>four</li>
    </ul>
  </div>
  <div class="cta__point">
    <svg class="cta__img" viewBox="0 0 24 24"> <path d="M16,18H7V4H16M11.5,22A1.5,1.5 0 0,1 10,20.5A1.5,1.5 0 0,1 11.5,19A1.5,1.5 0 0,1 13,20.5A1.5,1.5 0 0,1 11.5,22M15.5,1H7.5A2.5,2.5 0 0,0 5,3.5V20.5A2.5,2.5 0 0,0 7.5,23H15.5A2.5,2.5 0 0,0 18,20.5V3.5A2.5,2.5 0 0,0 15.5,1Z" /> </svg>
    <h3 class="cta__subtitle">Start-up</h3>
<ul class="cta__list">
      <li>one one one one one</li>
      <li>two</li>
      <li>three three three three</li>
      <li>four</li>
    </ul>  </div>
  <div class="cta__point">
    <svg class="cta__img" viewBox="0 0 24 24"> <path d="M12,8L10.67,8.09C9.81,7.07 7.4,4.5 5,4.5C5,4.5 3.03,7.46 4.96,11.41C4.41,12.24 4.07,12.67 4,13.66L2.07,13.95L2.28,14.93L4.04,14.67L4.18,15.38L2.61,16.32L3.08,17.21L4.53,16.32C5.68,18.76 8.59,20 12,20C15.41,20 18.32,18.76 19.47,16.32L20.92,17.21L21.39,16.32L19.82,15.38L19.96,14.67L21.72,14.93L21.93,13.95L20,13.66C19.93,12.67 19.59,12.24 19.04,11.41C20.97,7.46 19,4.5 19,4.5C16.6,4.5 14.19,7.07 13.33,8.09L12,8M9,11A1,1 0 0,1 10,12A1,1 0 0,1 9,13A1,1 0 0,1 8,12A1,1 0 0,1 9,11M15,11A1,1 0 0,1 16,12A1,1 0 0,1 15,13A1,1 0 0,1 14,12A1,1 0 0,1 15,11M11,14H13L12.3,15.39C12.5,16.03 13.06,16.5 13.75,16.5A1.5,1.5 0 0,0 15.25,15H15.75A2,2 0 0,1 13.75,17C13,17 12.35,16.59 12,16V16H12C11.65,16.59 11,17 10.25,17A2,2 0 0,1 8.25,15H8.75A1.5,1.5 0 0,0 10.25,16.5C10.94,16.5 11.5,16.03 11.7,15.39L11,14Z" /> </svg>
    <h3 class="cta__subtitle">Pro Business</h3>
<ul class="cta__list">
      <li>one</li>
      <li>two two two two two</li>
      <li>three three </li>
      <li>four</li>
    </ul>  </div>
  <div class="cta__point">
    <svg class="cta__img" viewBox="0 0 24 24"> <path d="M17.45,15.18L22,7.31V19L22,21H2V3H4V15.54L9.5,6L16,9.78L20.24,2.45L21.97,3.45L16.74,12.5L10.23,8.75L4.31,19H6.57L10.96,11.44L17.45,15.18Z" /> </svg>
    <h3 class="cta__subtitle">Business Plus</h3>
<ul class="cta__list">
      <li>one one one one one</li>
      <li>two</li>
      <li>three</li>
      <li>four</li>
    </ul>  </div>
</div>
              
            
!

CSS

              
                body {
  font-family: "Work Sans", sans-serif;
  line-height: 1.6;
  font-size: 1.125rem;
  display: grid;
  grid-template-columns: minmax(1rem, 1fr) repeat(6, minmax(5rem, 10rem)) minmax(
      1rem,
      1fr
    );
}

.btn {
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  background: black;
  color: white;
  padding: 0.75em 2em;
  border-radius: 100vmax;

  &:hover {
    background: #444;
  }
}

// Typography

.main__title {
  font-size: 5rem;
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 0.2em;
}

h2 {
  font-size: 2rem;
  line-height: 0.9;
  text-transform: uppercase;
  color: #454545;

  span {
    font-weight: 300;
    display: block;
  }
}

body > * {
  display: grid;
  // grid-template-columns: minmax(1rem, 1fr) repeat(6, minmax(5rem, 10rem)) minmax(1rem, 1fr);
  grid-column: 1 / -1;

  display: grid;
  grid-template-columns: subgrid;
}

.hero {
  padding: 3em 0;

  &__title {
    grid-column: 2 / 7;
    grid-row: 1 / 2;
  }

  &__img {
    grid-column: 4 / 8;
    grid-row: 1 / span 2;
    z-index: -1;
    justify-self: end;
  }

  &__body {
    grid-column: 2 / 4;
    p {
      margin-bottom: 2em;
    }
  }
}

.sales-points {
  padding: 3em 0;
  background: #efefef;
  text-align: center;

  &__sales-point:first-of-type {
    grid-column: 2 / span 2;
  }

  &__sales-point {
    grid-column: span 2;
  }
}

.cta {
  background: #333;
  padding: 3em 0;
  text-align: center;
  color: #f4f4f4;
  column-gap: 1em;

  //   grid-template-rows: 200px 200px 200px 300px 400px;

  &__title {
    grid-column: 2 / -2;
    color: white;
  }

  &__point {
    grid-row: 2;

    display: grid;
    grid-row: span 8;
    grid-template-rows: subgrid;
    
    border: 1px solid #000;
    background: rgba(0, 0, 0, .25);
    padding: 1em .5em;
   

    &:nth-of-type(1) {
      grid-column: 3;
    }
    &:nth-of-type(2) {
      grid-column: 4;
    }
    &:nth-of-type(3) {
      grid-column: 5;
    }
    &:nth-of-type(4) {
      grid-column: 6;
    }
  }

  &__img {
    fill: white;
    opacity: 0.5;
    width: 3rem;
    justify-self: center;
  }

  &__subtitle {
    margin: 0 0 0.25em;
  }

  &__body {
    margin-top: 0;
  }
}


.cta__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;

  
  & li {
      padding: 1em 0;

  }
  
  & li:not(:last-child) {
      border-bottom: 1px solid rgba(0,0,0,1);
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console