- Issue created by @heikkiy
- 🇫🇷France flocondetoile Lyon
If you have headings hidden, with a specific class, for example
.heading-hidden
, you can target headings with this css selector for exampleh2:not(.heading-hidden)
. Anyway you should be able to target heading with css selector. If you have headings not visible it's certainly because they have a custom/specific CSS class to hide them not ? - 🇫🇷France mably
We could use the new
checkVisibility
API to implement this feature:https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility
This could be enabled using a new configuration option.
@flocondetoile should we add this to the 3.0.x-dev branch?
- 🇫🇷France flocondetoile Lyon
As we didn't have feedback for this feature request, I guess that customizing the css selector for the heading has done the job.
There is still the case that some heading have a style inline applied (and not a CSS class) which hide them, but I think this is a narrow case.Let's wait a little to see if we have some more feedback, and if we need really a new setting like "check visibility headings" before adding these heading in a TOC.
If you think @mably it's a usefull feature, I let you chosse to add it or not.
- Merge request !17Issue #3370527 by heikkiy, mably: Exclude hidden elements from the table of content → (Merged) created by mably
- Assigned to mably
- Status changed to Needs review
4 months ago 8:55pm 16 August 2024 - 🇫🇷France mably
@heikkiy could you give a try to this issue's MR to see if it resolves your problem?
- Status changed to Fixed
4 months ago 10:21am 17 August 2024 - 🇫🇷France mably
A few commits have been added to 3.0.x-dev branch to fix highlighting with invisible headings.
Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.