- Issue created by @w01f
- Status changed to Closed: won't fix
4 months ago 12:31pm 27 August 2024 - π«π·France mably
This particular case should be handled in your site theme. 2 sizes in definitely not enough, some people will need to be able to handle 3 or more different size levels... This definitely belongs to your theme CSS files.
The ToC title configuration option can be left empty or hidden in CSS as you did, I'm not a SEO expert so won't be able to give a more precise answer.
- πΊπΈUnited States w01f
I disagree here - I think 2 sizes for basically choosing to group ToC with sibling elements on a larger screen that has more real estate, or limit to just the floating ToC on limited size mobile, would be sufficient for 95+% cases.
But we can rig something very simple up to unset the siblings on mobile for our case I think.
- πΊπΈUnited States w01f
Currently the parent container works exceptionally well on desktop.
In the Gordillo.Legal example, it allows the ToC and social media links to float together.
The real estate issue only happens on mobile devices. The ToC floats correctly and helpfully at the top (as long as the blog doesn't have too many headers, but I don't know a solution for that case). But the sibling elements also float which becomes obstructive.
If we could tweak the js target, that would solve this issue:
1. Target only ToC by default.
2. If parent container is defined, target that.
3. If parent container breakpoint is defined, switch from ToC to parent container at that point. - Merge request !21Issue #3470476 by mably: Responsive option with parent container β (Merged) created by mably
- π«π·France mably
Added an MR to this issue that allows you to override the default way to get the toc container.
You can check the code here: https://git.drupalcode.org/project/toc_js/-/merge_requests/21/diffs
It should allows you to do whatever you want to select the right container you are interested in.