az-digital / arizona-bootstrap

UArizona's front-end toolkit based on Bootstrap 4 and 5.
https://digital.arizona.edu/arizona-bootstrap
MIT License
5 stars 8 forks source link

Accordion titles can overlap arrows #1192

Closed joshuasosa closed 3 months ago

joshuasosa commented 5 months ago

Problem/Motivation

Accordion titles can overlap the accordion arrows if there's too much text.

Describe the bug

Sometimes the title of an accordion goes long or wraps on mobile. When it does, it can potentially overlap with the accordion arrows.

Proposed resolution

Changing to something like this fixes it:

.accordion .card-header .btn {
  padding: .75rem 2.25rem .75rem 1.25rem;
}

.accordion .card-header .btn::after {
  right: 10px;
}

@media (min-width: 576px) {
  .accordion .card-header .btn {
    padding-right: 3rem;
  }

  .accordion .card-header .btn::after {
    right: 20px;
  }
}

Alternatively, could backport the way Bootstrap 5 does it with flex.

Expected behavior

Accordion titles should never overlap accordion arrows.

Screenshots

Example

image

image

Example on it.arizona.edu

image image

Example on lpl.arizona.edu

image

Example solution on lpl.arizona.edu

image

mmunro-ltrr commented 4 months ago

This may be an issue where there are different fixes for the 2.x & main branches. Investigating...

mmunro-ltrr commented 3 months ago

Pull request https://github.com/az-digital/arizona-bootstrap/pull/1198 closed the original issue. Moving to a Flexbox approach remains an open issue, as https://github.com/az-digital/arizona-bootstrap/issues/1207