python / python-docs-theme

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

Only apply underline offset to code formatting for underline visibility #171

Closed hugovk closed 6 months ago

hugovk commented 6 months ago

Helps https://github.com/python/python-docs-theme/issues/168.

In #160 we added underlines to links, with an extra offset to help make sure underscores (_) are not obscured by the underlines.

(In https://github.com/python/python-docs-theme/pull/166 we reduced the amount of offset.)

We only really need the offset for code formatting, where underscores often show up, so we can use the default offset for normal links and only apply an extra offset for code.