Skip to content

Links badges without href breaks color #31279

@inwardmovement

Description

@inwardmovement

Links badges should be usable without href attribute, to be used like buttons. For now _reboot.scss breaks badge color:

a:not([href]) {
  color: inherit;
  [...]
}

Suggested fixes:

  • _reboot.scss:
a:not([href]):not(.badge)
  • provide support for using .badge-* classes on a <button> element, having the same styling as using them on a <a> element (no .btn styling).

  • add preventDefault() on anchor tags with href, like for link buttons

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