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

Simplify .-section-x-inset-xl CSS #945

Merged

Conversation

nicolo-ribaudo
Copy link
Contributor

@nicolo-ribaudo nicolo-ribaudo commented Feb 9, 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.

@CLAassistant
Copy link

CLAassistant commented Feb 9, 2025

CLA assistant check
All committers have signed the CLA.

@nicolo-ribaudo nicolo-ribaudo force-pushed the simplyfy-section-x-inset-xl-css branch from 14ddaa2 to ee4d42d Compare February 9, 2025 15:40
@lucacasonato lucacasonato added this pull request to the merge queue Feb 10, 2025
Merged via the queue into jsr-io:main with commit 31c1e76 Feb 10, 2025
6 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the simplyfy-section-x-inset-xl-css branch February 10, 2025 11:09
lucacasonato added a commit that referenced this pull request Feb 10, 2025
@lucacasonato
Copy link
Member

lucacasonato commented Feb 10, 2025

This broke the footer.

image

@nicolo-ribaudo nicolo-ribaudo restored the simplyfy-section-x-inset-xl-css branch February 10, 2025 11:34
@nicolo-ribaudo nicolo-ribaudo deleted the simplyfy-section-x-inset-xl-css branch February 10, 2025 11:38
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2025
… not block (#950)

Fixes #945 (comment). 

Only tested by changing the value in the browser devtools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horizontal scrollbar in package docs page
3 participants