mgeier / insipid-sphinx-theme

:yawning_face: An insipid theme for the Sphinx documentation generator.
https://insipid-sphinx-theme.readthedocs.io/
BSD 2-Clause "Simplified" License
39 stars 4 forks source link

Hovering of links not consistent #59

Closed hagenw closed 3 years ago

hagenw commented 3 years ago

Have a look at section 10.2:

image

The default behavior for links in text is to show a dashed underline, which vanished when the mouse hovers offer it. For the hello_world() link the behavior is opposite. If you hover with the mouse a non-dashed underline will appear.

I would vote for only showing a (dashed) line for links only when hovering with the mouse, this avoids also that pages look to cluttered. Compare

image

with

image

hagenw commented 3 years ago

I think I got now the idea for the dashed underline:

image

So, they should distinguish external from internal links. I would still argue that it looks better without the underlines, but when staying with them there ist still a small inconsitency when hovering with the mouse. In that case I would propose that the dashed underlines should change to an actual line as this happens for the internal links as well.

hagenw commented 3 years ago

Another disadvantage of the dashed underlines for external links is that they don't work well together with badges:

image

mgeier commented 3 years ago

Yes exactly, this is intentional, I would like to be able to differentiate internal and external links.

Some themes use a special symbol at the end of links, but I would like to have something less disruptive.

It doesn't have to be an underline, we can maybe also use different colors?

Or do you have other ideas how to make them different?

The hover behavior is not that important to me, but they should look different when not hovering over them.

mgeier commented 3 years ago

I've just merged #63.

Does that resolve this issue, or are there other things we should change?

hagenw commented 3 years ago

I'm trying to test it, but after installing it with pip install -e ., and setting the theme in my project building it with

$ python -m sphinx docs/ build/html -b html

fails with

...
writing output... [ 14%] api                                                                                                                                                                   
Theme error:
An error happened in rendering the page api.
Reason: TemplateNotFound('icons/menu.svg',)
hagenw commented 3 years ago

Sorry, forgot:

$ git submodule update --init

as I'm on a new machine ;)

hagenw commented 3 years ago

Buttons are indeed fixed now:

image

Hovering works now as expected. You could still call it inconsistent as it is different for internal and external links, but as they are also marked differently it behaves as a user would expect.

I will close the issue, thanks.