Marketing Site Content Section

By Rafi

F6
#
How do I use This?

A responsive content section that features equal height images and content containers. On mobile they collapse to a card like setup.

HTML
<div class="marketing-site-content-section">
  <div class="marketing-site-content-section-img">
    <img src="https://images.pexels.com/photos/256046/pexels-photo-256046.jpeg?h=350&auto=compress&cs=tinysrgb" alt="" />
  </div>
  <div class="marketing-site-content-section-block">
    <h3 class="marketing-site-content-section-block-header">Yeti Snowcone Agency</h3>
    <p class="marketing-site-content-section-block-subheader subheader">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam omnis, maxime libero natus qui minus!</p>
    <a href="#" class="round button small">learn more</a>
  </div>
  <div class="marketing-site-content-section-block small-order-2 medium-order-1">
    <h3 class="marketing-site-content-section-block-header">Yeti Snowcone Agency</h3>
    <p class="marketing-site-content-section-block-subheader subheader">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam omnis, maxime libero natus qui minus!</p>
    <a href="#" class="round button small">learn more</a>
  </div>
  <div class="marketing-site-content-section-img small-order-1 medium-order-2">
    <img src="https://images.pexels.com/photos/300857/pexels-photo-300857.jpeg?h=350&auto=compress&cs=tinysrgb" alt="" />
  </div>
</div>

.marketing-site-content-section {
  display: flex;
  flex-wrap: wrap;

  .button.round {
    border-radius: 5000px;
    text-transform: uppercase;
    margin-bottom: 0;
  }

  .marketing-site-content-section-img {
    align-self: center;
    flex: 1 0 100%;

    img {
      width: 100%;
    }

    @media screen and (min-width: 40em) {
      flex: 1 0 50%;
    }
  }

  .marketing-site-content-section-block {
    padding: 1rem;
    flex: 1 0 100%;
    align-self: stretch;
    background: $light-gray;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    @media screen and (min-width: 40em) {
      flex: 1 0 50%;
      padding: 2rem;
    }
  }
}

.marketing-site-content-section-block-header {
  font-size: 24px;
}

.marketing-site-content-section-block-subheader {
  font-size: 13px;
}


.marketing-site-content-section {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
}

.marketing-site-content-section .button.round {
  border-radius: 5000px;
  text-transform: uppercase;
  margin-bottom: 0;
}

.marketing-site-content-section .marketing-site-content-section-img {
  -webkit-align-self: center;
      -ms-flex-item-align: center;
              -ms-grid-row-align: center;
          align-self: center;
  -webkit-flex: 1 0 100%;
      -ms-flex: 1 0 100%;
          flex: 1 0 100%;
}

.marketing-site-content-section .marketing-site-content-section-img img {
  width: 100%;
}

@media screen and (min-width: 40em) {
  .marketing-site-content-section .marketing-site-content-section-img {
    -webkit-flex: 1 0 50%;
        -ms-flex: 1 0 50%;
            flex: 1 0 50%;
  }
}

.marketing-site-content-section .marketing-site-content-section-block {
  padding: 1rem;
  -webkit-flex: 1 0 100%;
      -ms-flex: 1 0 100%;
          flex: 1 0 100%;
  -webkit-align-self: stretch;
      -ms-flex-item-align: stretch;
          align-self: stretch;
  background: #e6e6e6;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-align-items: flex-start;
      -ms-flex-align: start;
          align-items: flex-start;
}

@media screen and (min-width: 40em) {
  .marketing-site-content-section .marketing-site-content-section-block {
    -webkit-flex: 1 0 50%;
        -ms-flex: 1 0 50%;
            flex: 1 0 50%;
    padding: 2rem;
  }
}

.marketing-site-content-section-block-header {
  font-size: 24px;
}

.marketing-site-content-section-block-subheader {
  font-size: 13px;
}

JS