Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion: card-header border bottom hidden by card-body. #28134

Closed
MargotPiva opened this issue Jan 29, 2019 · 2 comments · Fixed by #32013
Closed

Accordion: card-header border bottom hidden by card-body. #28134

MargotPiva opened this issue Jan 29, 2019 · 2 comments · Fixed by #32013
Labels

Comments

@MargotPiva
Copy link

MargotPiva commented Jan 29, 2019

When an accordion element is open, the border bottom of the card-header element is hidden by the card-body element (in case of non-transparent background). See here the actual comportment : https://codepen.io/anon/pen/GzjNYL.
This behavior is due to this :

margin-bottom: -$card-border-width;

This addition is due to those issues : #27124, #27108.
The bug reported here was the double border-bottom between the accordion elements when closed.

See the result when removing the rule over the margin-bottom : https://codepen.io/anon/pen/XOjNGz
Unfortunately the double border-bottom is back but the behavior of the card-header of an open element seems correct with a border-bottom.

@kampalex
Copy link

Using the dark colors the latest codepen example is very hard to exam.

The border-bottom is shown on transparent background. Due to the negative margin, the border-bottom of .card-header is covered by .card-body.
By applying 'z-index:1' onto .card-header styling, the border-bottom appears again.

@florianlacreuse
Copy link
Contributor

OP already said that this issue only occur in cases with with non-transparent backgrounds because of the negative margin .card-header.

Using z-index seems to do the job but i'm not sure if this is a cleanest way to fix it. No clear-cut opinion about it, just wondering since I think this should be fixed in Bootstrap project.

gijsroge pushed a commit to gijsroge/bootstrap that referenced this issue Feb 11, 2020
…ixes twbs#28873

Also fixes twbs#28134 as we move the border from the header to the body and no longer have a overlapping issue of the header bottom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants