<div class="text-image-panels--full-bleed-image">
    <section class="text-image-panels--full-bleed-image__wrap">
        <div class="text-image-panels--full-bleed-image__panel text-image-panels--full-bleed-image__panel--image"></div>
        <div class="text-image-panels--full-bleed-image__panel text-image-panels--full-bleed-image__panel--content text-image-panels-content">
            <h2 class="text-image-panels--full-bleed-image__heading employer-section__header__heading">About CareerBuilder</h2>
            <p>Learn more about CareerBuilder’s mission, our people who make it possible and how you can view our current job opportunities and join the CB team.</p>
            <a href="#" class="button button--tertiary text-image-panels--full-bleed-image__button">Read More About CareerBuilder</a>
        </div>
    </section>
</div>
<div class="text-image-panels--full-bleed-image">
  <section class="text-image-panels--full-bleed-image__wrap">
    <div class="text-image-panels--full-bleed-image__panel text-image-panels--full-bleed-image__panel--image"></div>
    <div class="text-image-panels--full-bleed-image__panel text-image-panels--full-bleed-image__panel--content text-image-panels-content">
        <h2 class="text-image-panels--full-bleed-image__heading employer-section__header__heading">About CareerBuilder</h2>
        <p>Learn more about CareerBuilder’s mission, our people who make it possible and how you can view our current job opportunities and join the CB team.</p>
        <a href="#" class="button button--tertiary text-image-panels--full-bleed-image__button">Read More About CareerBuilder</a>
    </div>
  </section>
</div>
/* No context defined for this component. */
  • Content:
    @mixin text-image-panels--full-bleed-image($image-url, $overlay-gradient: null, $image-side: left) {
      &__wrap {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
      }
    
      &__panel {
        width: 50%;
    
        @media only screen and (max-width: $small-screen-max) {
          width: 100%;
        }
      }
    
      &__panel--image {
    
        @if $image-side == right {
          order: 2;
        } @else {
          order: 1;
        }
    
        @if $overlay-gradient == null {
          background-image: url(asset_path($image-url));
        } @else {
          @include imageGradientBlend(asset_path($image-url), map-get($overlay-gradient, dark), map-get($overlay-gradient, medium), map-get($overlay-gradient, light), $blend-mode: unset);
        }
    
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    
        @media only screen and (max-width: $small-screen-max) {
          order: 1;
          height: 200px;
        }
      }
    
      &__panel--content {
        order: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: $base-spacing-xlarge;
    
        @media only screen and (max-width: $small-screen-max) {
          align-items: center;
          padding: $section-padding--mobile $base-spacing-medium;
        }
    
        // overwrites padding above
        @if $image-side == right {
          @include container-edge-calc(left, padding);
        } @else {
          @include container-edge-calc(right, padding);
        }
    
      }
    }
    
    @mixin text-image-panels-content {
      [class$='__heading'] {
        @include font-style--xl-light;
        max-width: 25ch;
        margin-bottom: $base-spacing-medium;
    
        @media only screen and (max-width: $small-screen-max) {
          width: 100%;
          text-align: center;
          margin-left: auto;
          margin-right: auto;
        }
      }
    
      [class$='__button'] {
        @media only screen and (max-width: $small-screen-max) {
          width: 100%;
        }
      }
    }
    
  • URL: /components/raw/layout_split/_layout_split.scss
  • Filesystem Path: sass/directives/03_components/layout_split/_layout_split.scss
  • Size: 1.9 KB
  • Handle: @layout_split
  • Preview:
  • Filesystem Path: sass/directives/03_components/layout_split/layout_split.hbs

The text-image-panels--full-bleed-image mixin generates a background image url with the Rails asset_path method. To see the image in the example, inspect the .text-image-panels--full-bleed-image__panel--image element and correct the background-image url from url(asset_path("http://via.placeholder.com/350x150")) to url("http://via.placeholder.com/350x150") (for now)