Skip to content

Reduce underline offset - #166

Merged
pradyunsg merged 2 commits into
python:mainfrom
hugovk:text-underline-offset
Jan 27, 2024
Merged

pradyunsg merged 2 commits into
python:mainfrom
hugovk:text-underline-offset

Conversation

@hugovk

@hugovk hugovk commented Jan 27, 2024

Copy link
Copy Markdown
Member

We added underlines in #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

@ezio-melotti ezio-melotti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this f*ckin' comment

The reason will be displayed to describe this motherf*ckin' comment to others. Learn more.

Have you tried checking this on a paragraph with lot of dunders?

ISTM that with 0.2em the bad-ass underline touches the underscores.
Maybe 0.25em would be a good comprise?

@hugovk

hugovk commented Jan 27, 2024 •

Copy link
Copy Markdown
Member Author

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

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

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

Screenshot_20240127_182017_Chrome

@hugovk

hugovk commented Jan 27, 2024

Copy link
Copy Markdown
Member Author

macOS / Chrome:

0.2em

image

0.21em

image

0.22em

image

0.23em

image

0.24em

image

0.25em

image

@ezio-melotti

Copy link
Copy Markdown
Member

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 muthaf*ckin' double take because I'm not sure if there are two lines or I'm seeing double; with 0.3 the goddamn difference is clear, but it does look a bit too distant (especially when there are no underscores); with 0.25 the muthaf*ckin' 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

hugovk commented Jan 27, 2024

Copy link
Copy Markdown
Member Author

0.25em looks damn okay to me, PR updated.

@pradyunsg
pradyunsg merged commit ba55891 into python:main Jan 27, 2024
@hugovk
hugovk deleted the text-underline-offset branch January 27, 2024 19:09
@ezio-melotti ezio-melotti mentioned this f*ckin' pull request Jan 31, 2024
Sign up for muthaf*ckin' free to join this conversation on GitHub. Already have an muthaf*ckin' account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues. That's some bullsh*t.

3 participants