<info-box>
    <details>
        <summary>
            <div class="infobox__teaser">
                <div class="infobox__teaser__left">
                    <span class="infobox__teaser__heading">Ich bin eine Infobox</span>
                    <span class="icon icon-info"></span>
                </div>
                <div class="infobox__teaser__right">
                    <span class="icon icon-chevron-down icon--small"></span>
                </div>
            </div>
        </summary>
        <div class="infobox__content">
            <h2>Ich bin eine Headline</h2>
            <p>Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr. <a href="#"">Link</a></p>
            <p>Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p>
            <h2>Ich bin eine Headline</h2>
            <p>Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p>
            <ul>
                <li>Ich bin ein kleines Listitem</li>
                <li>Ich bin ein kleines Listitem</li>
                <li>Ich bin ein kleines Listitem</li>
                <li><a href=" #"">Link</a></li>
                </ul>
        </div>
    </details>
</info-box>
<info-box>
    <details>
        <summary>
            <div class="infobox__teaser">
                <div class="infobox__teaser__left">
                    <span class="infobox__teaser__heading">Ich bin eine Infobox</span>
                    <span class="icon icon-info"></span>
                </div>
                <div class="infobox__teaser__right">
                    <span class="icon icon-chevron-down icon--small"></span>
                </div>
            </div>
        </summary>
        <div class="infobox__content">
            <h2>{{headline}}</h2>
            <p>{{text_short}} <a href="#"">Link</a></p>
            <p>{{text_short}}</p>
            <h2>{{headline}}</h2>
            <p>{{text_short}}</p>
            <ul>
                <li>{{listitem}}</li>
                <li>{{listitem}}</li>
                <li>{{listitem}}</li>
                <li><a href="#"">Link</a></li>
            </ul>
        </div>
    </details>
</info-box>
{
  "text_short": "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
  "headline": "Ich bin eine Headline",
  "listitem": "Ich bin ein kleines Listitem"
}
  • Content:
    $info-box-icon-font-size: ms(3);
    
    info-box {
      display: block;
    }
    
    .infobox__teaser {
      @extend %heading-font-bold;
    
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
      border-bottom: 3px solid $infobox-teaser-border-color;
      background-color: $infobox-teaser-background-color-closed;
      color: $infobox-teaser-text-color-closed;
      cursor: pointer;
      font-size: $font-size-xs;
    }
    
    .infobox__teaser__heading {
      display: inline-flex;
      align-items: center;
      padding-right: $spacer-xs;
    }
    
    .infobox__teaser__right {
      display: flex;
      padding: $spacer-sm $spacer-md $spacer-sm 0;
    }
    
    .infobox__teaser__left {
      display: flex;
      padding: $spacer-sm 0 $spacer-sm $spacer-md;
    }
    
    .icon-chevron-down {
      background: $infobox-teaser-text-color-closed;
    }
    
    .icon-info {
      background: $infobox-teaser-text-color-closed;
    }
    
    .infobox__content {
      padding: $spacer-sm $spacer-sm $spacer-md;
      background-color: $infobox-content-background-color;
    
      > * + * {
        margin-top: $spacer-md;
      }
    
      p,
      ul > li {
        @extend %heading-font-regular;
    
        font-size: $font-size-base;
        line-height: $paragraph-line-height;
      }
    }
    
    details {
      ::-webkit-details-marker {
        display: none; // hides marker in Safari
      }
    
      &[open] {
        .infobox__teaser {
          background-color: $infobox-teaser-background-color-open;
          color: $infobox-teaser-text-color-open;
    
          .icon-chevron-down {
            background: $infobox-teaser-text-color-open;
            transform: rotate(180deg);
          }
    
          .icon-info {
            background: $infobox-teaser-text-color-open;
          }
        }
      }
    }
    
    summary {
      display: block; // hides marker in all browser but Safari
    }
    
  • URL: /components/raw/info-box/info-box.scss
  • Filesystem Path: components/04-molecules/article&blog-post-elements/info-box/info-box.scss
  • Size: 1.7 KB
  • Handle: @info-box
  • Preview:
  • Filesystem Path: components/04-molecules/article&blog-post-elements/info-box/info-box.html

No notes defined.