<a class="link" href="#" role="link">
    <i class="base-icon" title="">
        <svg class="icon" preserveAspectRatio="xMaxYMin">
            <use xlink:href="/static/symbol-defs.svg#icon-plus" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0"></use>
        </svg>
    </i> Link with icon
</a>
<a
  class="link
    {{~#if styled }} link--styled{{/if~}}
    {{~#if color }} link--{{ color }}{{/if~}}
  "
  {{~#if href }} href="{{ href }}"{{/if~}}
  role="link"
  >
  {{#if icon}}
    {{> @icon icon}}
  {{/if}}
  {{ text }}
</a>
{
  "text": "Link with icon",
  "href": "#",
  "icon": {
    "symbol": "plus"
  }
}
  • Content:
    a {
      display: inline-flex;
      gap: .5rem;
      text-decoration: none;
      color: var(--brand-color-secondary);
    }
    
    .link {
      &:link {
        color: var(--brand-color-secondary);
        &:active {
          color: var(--brand-color-primary);
        }
        &:hover,
        &:focus {
          text-decoration: underline;
        }
      }
    
      &--primary {
        &:link,
        &:active,
        &:hover,
        &:focus {
          color: var(--brand-color-primary);
        }
      }
      &--secondary {
        &:link,
        &:active,
        &:hover,
        &:focus {
          color: var(--brand-color-secondary);
        }
      }
    
      &--styled {
        &:link {
          color: var(--brand-color-primary);
          &:active,
          &:hover,
          &:focus {
            text-decoration: none;
          }
          &:hover,
          &:focus {
            color: var(--brand-color-secondary);
          }
        }
        &:link:active {
          color: var(--brand-color-primary);
        }
        &:not(:active) .base-icon {
          color: var(--brand-color-secondary);
        }
      }
    }
  • URL: /components/raw/link/links.scss
  • Filesystem Path: src/components/atoms/link/links.scss
  • Size: 943 Bytes

No notes defined.