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

Add <span class="section-number"> to section numbers in "globaltoc.html" #7514

Open
mgeier opened this issue Apr 19, 2020 · 1 comment
Open
Labels
builder:html type:enhancement enhance or introduce a new feature

Comments

@mgeier
Copy link
Contributor

mgeier commented Apr 19, 2020

Is your feature request related to a problem? Please describe.

It's not really a problem, but I (as a theme author) would like to style the section numbers in the sidebar separately from the section titles.

In other places, the section numbers are already enclosed in <span class="section-number"> and </span>, so I think it would make sense to also have this in the globaltoc.html (in the sidebar).

Describe the solution you'd like

I'd like the function toctree() (which is available inside the HTML templates) to add <span class="section-number"> and </span> around section numbers.

Describe alternatives you've considered

I guess an alternative would be to re-implement the whole toctree() function, but I think this would be a lot of work and I wouldn't even know where to start.

I think with the current version of the toctree() function it is not possible to select the section numbers with CSS.

Additional context

This would be the logical continuation of:

@mgeier mgeier added the type:enhancement enhance or introduce a new feature label Apr 19, 2020
@mgeier
Copy link
Contributor Author

mgeier commented Apr 27, 2020

cc @yves-chevallier since you implemented #6632?

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder:html type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

3 participants