sphinx_rtd_theme icon indicating copy to clipboard operation
sphinx_rtd_theme copied to clipboard

Sidebar should not be floating on mobile

Open kartben opened this issue 1 year ago • 1 comments

When sidebar is set to 100% width on mobile, it should also be switched back to being non-floating.

kartben avatar Oct 18 '24 08:10 kartben

The CI error seems unrelated to my change?

kartben avatar Oct 18 '24 21:10 kartben

@humitos ping?

kartben avatar Oct 30 '24 18:10 kartben

I'm not sure to understand what issue this PR solves. Can you expand on that? Maybe attaching a screenshot / video will help here as well.

humitos avatar Oct 31 '24 10:10 humitos

@humitos Thanks for the reply!

Basically, if the aside keeps floating when the screen is narrow, the element that follows ends up "swallowing" it, whereas it should instead be back to a "non-floating" layout in this particular situation

https://github.com/user-attachments/assets/60cea4f6-a7ff-4a97-b365-9fe80ebb0710

Depending on how the element that immediately follows the aside is styled, this can cause very visible glitches. It might not be directly reproducible in RTD theme proper, but it can impact people who tweak the theme downstream

For example:

section > p:first-of-type {
    margin-inline: -10px;
    border-inline-start: 5px black solid;
    padding-inline-start: 10px;
}

The incorrect layout would be:

image

While making sure the aside does not float anymore gives:

image

Again, I appreciate that this might not be directly visible/reproducible in RTD theme but IMO it would still be "typographically incorrect" to not implement the fix.

Thanks!

kartben avatar Oct 31 '24 15:10 kartben

@agjohnson could you help review? thanks!

kartben avatar Nov 13 '24 15:11 kartben

Not sure what is going on with the test failure, it looks like CircleCI is misbehaving though. I think this is safe to merge.

agjohnson avatar Nov 13 '24 23:11 agjohnson