/**
 * From https://gist.github.com/jamesmusgrave/d23b9d2f42ffdddd40c5
 */
@mixin smart-underline($background: #fff, $text: #000, $selection: #ffc, $position: 86%) {
  color: inherit;
  text-decoration: none;
  background: -webkit-linear-gradient($background, $background), -webkit-linear-gradient($background, $background), -webkit-linear-gradient($text, $text);
  background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
  background-repeat: no-repeat, no-repeat, repeat-x;
  text-shadow: 0.03em 0 $background, -.03em 0 $background, 0 0.03em $background, 0 -.03em $background, .06em 0 $background, -.06em 0 $background, .09em 0 $background, -.09em 0 $background, .12em 0 $background, -.12em 0 $background, .15em 0 $background, -.15em 0 $background;
  background-position-y: $position, $position, $position;
  background-position-x: 0%, 100%, 0;

  &::selection {
    text-shadow: none;
  }

  &::before,
  &::after,
  *,
  *::before,
  *::after {
    text-shadow: none;
  }

  &:visited {
    color: inherit;
  }
}
