matplotlib / mpl-brochure-site

Source for the top-level landing page.
Other
3 stars 13 forks source link

MNT: Update Matplotlib and pydata sphinx theme #92

Closed QuLogic closed 1 week ago

QuLogic commented 3 months ago

I didn't test, so we'll see how the build goes.

QuLogic commented 3 months ago

OK, managed to get it building; however there are some differences in the result:

timhoffm commented 3 months ago

Since we‘re based on pydata-sphinx-theme, we should follow most of their design decisions. The more we customize, the more we have maintenance on future updates. For example, the underlining is a conscious accessibility decision. Additionally, the same changes apply to our main docs, and we want consistency between them.

We should simply accept most of the changes. The only things to watch out for are css changes on their side that affect custom elements on our side in a negative way ( parts of the primary highlight color).

QuLogic commented 1 week ago

So I think I actually misunderstood some of the style; I thought we had set blue/orange for links to follow our default colour cycle, but it turns out that was just the default from pydata-sphinx-theme. So the change to purple-on-hover should be expected, and is consistent with our latest doc builds.

  * The quicklinks are black on hover for Reference and Documentation, but purple for the others

These were because colours were set on a but not a:visited, and formerly, it seems that those were inherited; fixed here.

  * Some footer links are blue instead of white (without hover).

Same as above; fixed here.

  * The Try on Binder button is purple on hover instead of white.

Similarly, this is because the theme/Sphinx started setting colour on a:hover instead of inheriting it, so we need to also override that ourselves.

Did that here and here.

* There's a slight change in spacing between Stable and Development links in the footer.

Fixed here plus here.

I also recommend adding

html_theme_options = {
    "back_to_top_button": False,
}

to conf.py to turn off the back to top button in the landing pages. Cheers!

Done.