python / python-docs-theme

Sphinx theme for Python documentation
Other
74 stars 58 forks source link

Reduce underline offset #166

Closed hugovk closed 6 months ago

hugovk commented 6 months ago

We added underlines in https://github.com/python/python-docs-theme/pull/160, with an offset to make sure they don't obscure underscores in code formatting. With fresh eyes, 0.3em looks a bit too much. Let's reduce it.

0.3em

image

0.2em

image

hugovk commented 6 months ago

Here's a link to the build preview of that section:

https://python-docs-theme-previews--166.org.readthedocs.build/en/166/reference/datamodel.html#object.reversed

There is a small gap between the underscore and underline (Android/Chrome):

Screenshot_20240127_182017_Chrome

hugovk commented 6 months ago

macOS / Chrome:

0.2em

image

0.21em

image

0.22em

image

0.23em

image

0.24em

image

0.25em

image
ezio-melotti commented 6 months ago

This is on Linux/Firefox: 0.2em: image

0.25em: image

0.3em: image

I like 0.25 -- with 0.2 I have to do a double take because I'm not sure if there are two lines or I'm seeing double; with 0.3 the difference is clear, but it does look a bit too distant (especially when there are no underscores); with 0.25 the underline is closer to the text but I can still see the two lines distinctly. (Disclaimer, I'm running on 4h of sleep and my eyes are a bit tired, I can take a look again tomorrow -- maybe the 0.2 will look better).

hugovk commented 6 months ago

0.25em looks okay to me, PR updated.