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

Update API styling for changes in sphinx 4.x #485

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

jorisvandenbossche
Copy link
Member

This is specifically updating the CSS for C++ API docs. Those got some additional styling in recent sphinx versions (https://github.com/sphinx-doc/sphinx/pull/9023/files#diff-25843cc831c4c93b5a56abd6c46e8964a68ce9cabfdf7b538fdc3dc37d82608fR546-R566), which gave an even bigger mixture of colors (with a blue that we don't use anywhere else):

image

This PR is overriding that added CSS to use our base color variables.

In addition, this PR also gives a color to the main function/method/attribute name in the signature (sig-name class). This is related to the changes in sphinx we discussed in #460. This doesn't fully tackle that issue (I also think that the single font size for example is an improvement). But using a different color for the main function name can be useful to quickly see which functions are documented in an overview (see eg https://arrow.apache.org/docs/python/generated/pyarrow.Date64Array.html#pyarrow.Date64Array, if you scroll down to under the table)

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.

This all looks reasonable to me! One quick question: if people use Sphinx 3, will this make things look weird for them? If not then I think we should just merge and release 🚀

@jorisvandenbossche
Copy link
Member Author

Good question: I now built our demo docs with sphinx 3.5.4, and that looks fine (some of the class names just don't exist yet, and eg the sig-name color I added was already like that before because it took the color of code divs.

@jorisvandenbossche jorisvandenbossche merged commit d2b3a3b into pydata:master Oct 1, 2021
@jorisvandenbossche jorisvandenbossche deleted the api-cpp branch October 1, 2021 11:13
matthewevans pushed a commit to aptech/pydata-sphinx-theme that referenced this pull request Dec 16, 2021
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.

2 participants