Skip to content

Docs: Prevent layout shift caused by Carbon ads #41448

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

Closed
julien-deramond opened this issue May 7, 2025 · 4 comments · Fixed by #41506
Closed

Docs: Prevent layout shift caused by Carbon ads #41448

julien-deramond opened this issue May 7, 2025 · 4 comments · Fixed by #41506

Comments

@julien-deramond
Copy link
Member

julien-deramond commented May 7, 2025

After the documentation migration, it's been noted that the Carbon Ads still cause a layout shift when they load, which can be a bit distracting. This issue actually existed before the migration as well, but it's worth revisiting to improve the overall user experience.

One possible solution could be to reserve space for the ad container ahead of time to prevent content from shifting during load.

Image

To reproduce, one can go to https://getbootstrap.com/docs/5.3/components/button-group/ for instance.

@PierBover
Copy link

Should be simple enough to add a min-height: 100px here:

@julien-deramond
Copy link
Member Author

julien-deramond commented May 7, 2025

I haven't checked yet, but that could work if the ads always have the same height.
If you're up for it @PierBover, feel free to open a PR — we'd really appreciate the contribution!

@PierBover
Copy link

Sure!

@julien-deramond julien-deramond moved this from To do to In progress in v5.3.7 May 7, 2025
@PierBover
Copy link

Here it is. I hope it's all clear and haven't done anything weird!

#41452

@julien-deramond julien-deramond moved this from In progress to Needs review in v5.3.7 May 7, 2025
@julien-deramond julien-deramond moved this from Needs review to Review in progress in v5.3.7 May 24, 2025
@github-project-automation github-project-automation bot moved this from Review in progress to Done in v5.3.7 May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants