<p class="badge">

    <span class="badge__text">Tipp aus der Redaktion</span>
</p>
{% set icon = icon ?? false %}

<p {{ html_attributes({
  class: {
    'badge': true,
  },
}, attrs ?? {}) }}>
  {% if icon|default %}
    <span class="badge__icon">
      {% include '@icon' with { icon: icon } only %}
    </span>
  {% endif %}

  {% if text|default %}
    <span class="badge__text">{{ text }}</span>
  {% endif %}
</p>
/* No context defined. */
  • Content:
    :root {
      --badge-background-color: var(--color-white);
      --badge-icon-color: var(--color-orange);
      --badge-icon-size: 0.2em;
      --badge-rotation: 15deg;
      --badge-size: 11.2rem;
      --badge-text-color: var(--text-color);
      --badge-text-line-height: var(--line-height-small);
      --badge-text-size: 0.125em;
      --badge-text-weight: var(--font-weight-semibold);
    }
    
    .badge {
      align-items: center;
      aspect-ratio: 1;
      background-color: var(--badge-background-color);
      block-size: 1em;
      border-radius: 50%;
      display: flex;
      flex-direction: column;
      font-size: var(--badge-size);
      inline-size: 1em;
      justify-content: center;
      transform: rotate(var(--badge-rotation));
    }
    
    .badge__icon {
      color: var(--badge-icon-color);
      font-size: var(--badge-icon-size);
    
      &:only-child {
        font-size: calc(var(--badge-icon-size) * 1.8);
        line-height: 0;
      }
    
      &:not(:only-child) {
        margin-block-end: 0.3em;
        margin-block-start: -0.3em;
      }
    }
    
    .badge__text {
      color: var(--badge-text-color);
      font-size: var(--badge-text-size);
      font-weight: var(--badge-text-weight);
      letter-spacing: -0.05em;
      line-height: var(--badge-text-line-height);
      padding-inline: 0.7em;
      text-align: center;
    }
    
  • URL: /components/raw/badge/badge.scss
  • Filesystem Path: src/components/1-atoms/badge/badge.scss
  • Size: 1.2 KB

No notes defined.