Skip to content

.list-group-item-action.active shows on hover underline if you changed default link on hover to underline #41806

@AucT

Description

@AucT

Prerequisites

Describe the issue

in 5.3.3 it was fine but in 5.3.8:

If you change in _variables.scss $link-hover-decoration to $link-hover-decoration: underline !default; you'll get ugly underline on hover active list-group-item

Probably because of not(.active)

.list-group-item-action {
  width: 100%; // For `<button>`s (anchors become 100% by default though)
  color: var(--#{$prefix}list-group-action-color);
  text-align: inherit; // For `<button>`s (anchors inherit)

  &:not(.active) {
    // Hover state
    &:hover,
    &:focus {
      z-index: 1; // Place hover/focus items above their siblings for proper border styling
      color: var(--#{$prefix}list-group-action-hover-color);
      text-decoration: none;
      background-color: var(--#{$prefix}list-group-action-hover-bg);
    }

    &:active {
      color: var(--#{$prefix}list-group-action-active-color);
      background-color: var(--#{$prefix}list-group-action-active-bg);
    }
  }
}

Reduced test cases

https://codepen.io/AucT/pen/myVMxbX

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions