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

Style the toctree #693

Merged
merged 6 commits into from Jun 7, 2022
Merged

Style the toctree #693

merged 6 commits into from Jun 7, 2022

Conversation

12rambau
Copy link
Collaborator

@12rambau 12rambau commented Jun 3, 2022

Fix #553

This one has been left for a long time and the css proposed by @choldgraf was super nice. As I was in a PR mood tonight I've copy/pasted your suggested css into a dedicated _toctree.scss file.

I hope you don't mind

@12rambau 12rambau marked this pull request as ready for review June 3, 2022 23:04
@12rambau 12rambau requested a review from choldgraf June 3, 2022 23:04
@choldgraf
Copy link
Collaborator

choldgraf commented Jun 4, 2022

Thanks! I think it looks nice 👍 A few quick thoughts:

I think this is somehow also impacting the header navigation bar:

image

Because the selector is for the l1 level, it means that deeper toctree levels dont have these rules applied to them, can we generalize it so that they do?

e.g., from: https://pydata-sphinx-theme--693.org.readthedocs.build/en/693/demo/index.html

image

@12rambau
Copy link
Collaborator Author

12rambau commented Jun 5, 2022

2 birds one stone:

  • I only edit the css for the toctree in toctree-wrapper (excluding the primary sidebar and header navbar)
  • Apply this modification for every level from 1 to 6

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one quick comment on having slightly smaller fonts for levels >= 2, but it looks good to me!

Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the improvement!

@choldgraf choldgraf changed the title style the toctree Style the toctree Jun 7, 2022
@choldgraf choldgraf merged commit 04dd62b into pydata:main Jun 7, 2022
@12rambau 12rambau deleted the toctree branch June 7, 2022 08:11
@jarrodmillman jarrodmillman added this to the 0.9 milestone Jun 7, 2022
jarrodmillman added a commit to choldgraf/pydata-sphinx-theme that referenced this pull request Jun 7, 2022
* main:
  Use myst-parser 0.18 (pydata#703)
  Style the toctree (pydata#693)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style our captions / table of contents
3 participants