////
/// @group Typography
////

/// Default link style for use on a normal (light) background
/// @since 0.2.10
%link {
  color: $colour-link;
  text-decoration: underline;
  text-decoration-skip: ink;

  &:visited {
    color: $colour-link-visited;
  }

  &:hover {
    color: $colour-link-hover;
  }

  &:focus {
    @include default-focus-style;
    color: $colour-link-focus-text;
  }

  &:active {
    color: $colour-link-active;
  }
}

/// Inverse link style for use on an inverse (dark) background
/// @since 0.2.9
%inverse-link {
  color: $colour-link-inverse;
  text-decoration: underline;
  text-decoration-skip: ink;

  &:visited {
    color: $colour-link-inverse-visited;
  }

  &:hover {
    color: $colour-link-inverse-hover;
  }

  &:focus {
    color: $colour-link-inverse-focus-text;
  }

  &:active {
    color: $colour-link-inverse-active;
  }
}

/// Inverse links for use on a dark background
/// @since 0.2.9
%inverse-links {
  a {
    @extend %inverse-link;
  }
}

a {
  @extend %link;
}

/// Inverse link for use on a dark background. Apply to an individual link.
/// Prefer using `.inverse-links` on the container instead.
/// @since 0.2.9
.link--inverse {
  @extend %inverse-link;
}

/// Inverse links, for use on dark backgrounds e.g dark panels.
/// Use this class on a containing element to apply to all links within it.
/// @require %inverse-links
/// @since 0.2.9
.inverse-links {
  @extend %inverse-links;
}
