-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Toc component: style improvements #405
Conversation
@malberts so as you guessed we were having the table of contents in the main contents area, in fact to test this out I was using the If you don't mind sharing the layout that you were using, I can rework this patch to ensure that the sidebar styles aren't affected by either moving the styles for the sidebar to be scoped to the sidebar, or moving my changes to be scoped to the main content section |
@DanielWTQ I posted a very basic sidebar example here: #386 (comment) |
I moved the Hide/Show fix into a separate PR: #410. Thanks for including it here. |
Improve the styles for the newly added Toc component, which adds a sticky table of contents: - Restore a background color for the table. - With that background color, the table shouldn't take up the entire width of the page, so remove the 100% width. - Specify `z-index: 1;` for the wrapping div so that reference tooltips from the Cite extension are not shown through the table of contents. WE-279
Thanks - I removed that from my patch. Please let me know what else needs to be fixed for this to be mergeable |
My original concern about the background color and width still apply. What is the use case for putting the TOC in the main section? Are you trying to separate it from the page content somehow? |
I was putting it in the main section to be above the normal page content but still in the same horizontal area, the way that tables of contents exist in Vector, for example. |
I'm merging this, but I'll add a note that the wiki admin should should implement styling since the (likely more common) use case of moving the TOC to the sidebar will look ugly otherwise. I cannot think of an easy way to distinguish the TOC being in the sidebar, above MainContent, or anywhere else really. |
Improve the styles for the newly added Toc component, which adds a sticky table of contents:
Restore a background color for the table.
With that background color, the table shouldn't take up the entire width of the page, so remove the 100% width.
Specify
z-index: 1;
for the wrapping div so that reference tooltips from the Cite extension are not shown through the table of contents.Restore the ability to toggle the visibility of the table of contents.
WE-279