a {
  color: @link-color;
  &:hover { color: @link-hover-color; }
  &:hover, &:focus { text-decoration: underline; }

  &:visited:not(.btn) {
    color: @link-visited-color;
    &:hover { color: @link-visited-hover-color; }
  }

  // Exceptions to :visited state
  &.list-group-item:visited {
    color: @list-group-link-color;
    &.active, &.active:hover, &.active:focus { color: @list-group-active-color; }
    &:hover { color: @list-group-link-color; }
  }
  .navbar-default &.navbar-brand:visited { color: @navbar-default-brand-color; }
  .navbar-inverse &.navbar-brand:visited { color: @navbar-inverse-brand-color; }
  .nav-tabs > li > &:visited { color: @link-color; }
  .nav-pills > li > &:visited { color: @link-color; }
  .nav-pills > li.active > &:visited {
    &, &:hover, &:focus { color: @nav-pills-active-link-hover-color; }
  }
  .dropdown-menu > li > &:visited {
    color: @dropdown-link-color;
    &:hover,
    &:focus {
      color: @dropdown-link-hover-color;
      background-color: @dropdown-link-hover-bg;
    }
  }
  .dropdown-menu > li.disabled > &:visited {
    &, &:hover, &:focus { color: @dropdown-link-disabled-color; }
  }
  .pager > li > &:visited, .pagination > li > &:visited {
    &, &:hover, &:focus { color: @link-color; }
  }
  .pagination > .active > &:visited {
    &, &:hover, &:focus { color: @pagination-active-color; }
  }
  .pagination > .disabled > &:visited {
    &, &:hover, &:focus { color: @pagination-disabled-color; }
  }
  &.alert-link:visited {
    color: inherit;
  }
}
