crate / crate-docs-theme

A Sphinx theme for the CrateDB documentation.
https://crate-docs-theme.readthedocs.io/
Apache License 2.0
20 stars 5 forks source link

Highlighting of "current" item in primary navigation is wrong #499

Closed amotl closed 5 months ago

amotl commented 5 months ago

Problem

@wierdvanderhaar reported:

There is something strange going on our website within the documentation section. If you go to this link, You end up on the correct page; however, in the left navigation pane, the last item in the list, Streamsets is highlighted. Looking at it, this is also the case when selecting one of the others like MongoDB, for example.

image

amotl commented 5 months ago

Analysis

For any reasons, the last HTML <li> element in the <ul> list has the current CSS attribute.

image

It looks like it is already part of the rendered HTML. So, JavaScript adjustments like those of sphinx-rtd-theme apparently do not play a role here.

Evaluation

I think highlighting the last item is wrong, and highlighting nothing would be right.

amotl commented 5 months ago

Fixed on-site, on a particular documentation section. Thanks, @proddata. The same trick might need to be applied to other sections as well.