<article class="snippet-e">
    <a href="#" class="snippet-e__link">
        <div class="snippet-e__visual">
            <div class="snippet-e__image">
                <picture class="visual visual--contained">
                    <img data-sizes="auto" data-src="https://via.placeholder.com/320x240" class="lazyload" alt="">
                </picture>

            </div>
        </div>

        <div class="snippet-e__content">
            <div class="snippet-e__heading">Product category</div>
        </div>
    </a>
</article>
<article class="snippet-e">
  <a href="{{ url }}" class="snippet-e__link">
    <div class="snippet-e__visual">
      <div class="snippet-e__image">
        {{render '@visual' visual merge=true}}
      </div>
    </div>

    <div class="snippet-e__content">
      <div class="snippet-e__heading">{{heading}}</div>
    </div>
  </a>
</article>
url: '#'
visual:
  src: https://via.placeholder.com/320x240
  contained: true
heading: Product category
  • Content:
    .snippet-e {
      transition: background-color 250ms;
      position: relative;
      flex: 1 1 auto;
      display: block;
      width: 100%;
      height: 0;
      padding-top: 100%;
      background-color: var(--color--neutrals-0);
    
      &:hover {
        background-color: var(--color--neutrals-1);
      }
    }
    
    .snippet-e__link {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      color: inherit;
      text-decoration: none;
    }
    
    .snippet-e__visual {
      flex: auto;
      display: flex;
      padding: calc(var(--gap) * 4) calc(var(--gap) * 4) 0;
    }
    
    .snippet-e__image {
      position: relative;
      flex: auto;
    }
    
    .snippet-e__content {
      flex: none;
      display: flex;
      align-items: center;
      justify-content: center;
      height: calc(var(--p--1) + (var(--gap) * 8));
    }
    
    .snippet-e__heading {
      flex: auto;
      padding: 0 calc(var(--gap) * 4);
      font-size: var(--p--1);
      line-height: 1.1;
      text-transform: uppercase;
      font-weight: 700;
      text-align: center;
    }
    
  • URL: /components/raw/snippet-e/snippet-e.scss
  • Filesystem Path: ../src/03_molecules/snippet-e/snippet-e.scss
  • Size: 968 Bytes

No notes defined.