Skip to content

Local ToC renders incorrectly on certain screen sizes when a global ToC isn't present #1335

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

Open
johnridesabike opened this issue Mar 23, 2025 · 1 comment

Comments

@johnridesabike
Copy link

The local table-of-contents doesn't display correctly on a screen size between about 800px and 1600px. The local odoc-tocs class is given grid-area: sidebar but sidebar does not exist in the grid template. This does not seem to happen when a global table-of-contents is present.

The issue, as far as I can tell, is that both of these rules are in effect:

body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) {

body.odoc .odoc-tocs {

I haven't looked into it extensively, but my first guess is that line 319's greater specificity is overriding 1283, which is supposed to be used instead:

$ odoc --version
3.0.0

Here's an example of what it looks like:

Image

@jonludlam
Copy link
Member

Thanks for reporting this, yes, this clearly needs fixing.

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

No branches or pull requests

2 participants