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

Horizontal scrollbar in package docs page #944

Closed
nicolo-ribaudo opened this issue Feb 9, 2025 · 0 comments · Fixed by #945
Closed

Horizontal scrollbar in package docs page #944

nicolo-ribaudo opened this issue Feb 9, 2025 · 0 comments · Fixed by #945

Comments

@nicolo-ribaudo
Copy link
Contributor

nicolo-ribaudo commented Feb 9, 2025

https://jsr.io/@babel-test-6ae45912/[email protected]/doc

I see it both in Chrome and Firefox

Image

It's only when the page is larger than 1280px.

The problem is the -section-x-inset-xl class used in the docs header. However, I'm not going to submit a PR to fix that because it looks like it's a bunch of hard-coded numbers and I don't know where they are coming from.

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Feb 9, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 10, 2025
In the first three `calc()` expressions, `100vw` is less than `1280px`
(otherwise we'd be in the `screen(xl)` media query), so `min(1280px,
100vw)` is just a complex way to say `100vw`, and thus `calc((100vw -
(min(1280px, 100vw) - 32px)) / 2 * -1)` is just a very complex way to
say `-16px`. I simplified them to the corresponding `-mx-` classes, so
that it's clear that they are the same numbers used in
`.section-x-inset-xl`.

In the last `calc()`, `100vw` is always more than `1280px` (because of
the media query), so `min(1280px, 100vw)` is just a complex way of
saying `1280px`. I left `1280px - 112px` which is hopefully more clear
than just writing `1068px`.

Note that using `100vw` instead of `1280px` in the last one would fix
the bug reported in #944, but I'm
assuming that `min(1280px, 100vw)` is there for a reason so I cannot
simply remove it.

---

**Edit**: The second commit fixes #944, by using the page width
_excluding the vertical scrollbar_ rather than using the full page width
to compute the sticky breadcrumb margin.
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in JSR Feb 10, 2025
@lucacasonato lucacasonato reopened this Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants