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

Disable auto TOC collapsible headers #949

Open
keepersdungeon opened this issue Sep 13, 2024 · 4 comments
Open

Disable auto TOC collapsible headers #949

keepersdungeon opened this issue Sep 13, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@keepersdungeon
Copy link

Hello,
Is there a way to disable the auto TOC collapsible headers by default?
I still wanna have the option for collapse them but not automatically

Thank you!

@keepersdungeon keepersdungeon added the enhancement New feature or request label Sep 13, 2024
@alistair3149
Copy link
Member

Yes it is a planned feature for the next release.

@keepersdungeon
Copy link
Author

Hello @alistair3149 ,
Is there a way to disable the auto TOC collapsible while u implement this in the theme?
Thanks

@alistair3149
Copy link
Member

Is there a way to disable the auto TOC collapsible while u implement this in the theme?

There isn't a way now but you can disable the whole collapse feature through CSS:

/* Hide ToC collapse toggle */
.client-js .citizen-toc .citizen-toc-toggle {
	display: none;
}

/* Remove reserved space for ToC collapse toggle */
.citizen-toc-link:has( + .citizen-toc-toggle ) {
	margin-right: 0;
}

/* Do not collapse ToC children */
.client-js .citizen-toc .citizen-toc-level-1 .citizen-toc-list-item {
	display: block;
}

@keepersdungeon
Copy link
Author

Thank you for the css code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants