Update API styling for changes in sphinx 4.x #485
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):
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)