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

Remove accordion jump #32278

Closed
wants to merge 3 commits into from
Closed

Remove accordion jump #32278

wants to merge 3 commits into from

Conversation

MartijnCuppens
Copy link
Member

@MartijnCuppens MartijnCuppens commented Nov 29, 2020

Inspired by Eric, I added a little accordion jump in #32013. Turns out @XhmikosR didn't like that, so he opened #32250.

Method is similar to the technique we use for the input/button groups. Because we now have an overlap, I needed a non-transparent color to prevent the colors from mixing.

I still notice a little jump in Chrome (rendering issue in Chrome, macOS?), but I'm afraid that's out of our jurisdiction (tried some hacks with will-change, but without result).

There's also still a little jump on the last item, but we also add an additional border. We could "fix" this by adjusting the bottom padding, but this could become problematic when the paddings are removed. Also, because in reality the accordion content won't always be exactly the same, chances are the total accordion height will vary when sections are collapsed.

Closes #32251 which closes #32250

Preview: https://deploy-preview-32278--twbs-bootstrap.netlify.app/docs/5.0/components/accordion/#example

@XhmikosR
Copy link
Member

XhmikosR commented Nov 30, 2020

I moved this to beta2, if someone wants to take another stab at it because indeed there's still a little jump @mdo.

EDIT: BTW this seems to make the border 2x compared to what it is on main.

@patrickhlauke
Copy link
Member

the jump seems much more pronounced (for me at least) at 100% zoom (keep your eye on the 3rd accordion button and how that jiggles).

100-zoom

at 150% zoom it seems gone

150-zoom

might it be something to do with rounding errors?

at least the subtle jiggle in the content of the panels themselves when they close seems to have removed completely.

@XhmikosR
Copy link
Member

XhmikosR commented Dec 1, 2020

I personally see the same thing regardless of zoom or browser, but I'm on 175% DPI.

@XhmikosR XhmikosR mentioned this pull request Jan 13, 2021
@mdo
Copy link
Member

mdo commented Feb 11, 2021

Closing for #32251.

@mdo mdo closed this Feb 11, 2021
@XhmikosR XhmikosR deleted the main-mc-sorry-eric branch February 11, 2021 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accordion slight jump when toggling items
4 participants