Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/godoc: some line-heights became less readable #27321

beaubrueggemann opened this issue Aug 28, 2018 · 3 comments


None yet
5 participants
Copy link

commented Aug 28, 2018 changed some line-height values in godoc/static/style.css, dropping the em unit specifier.

It appears these line-height changes weren't meant to have any visible changes. The reasoning in the CL states:

If the line-height is specified in em, you can just drop the em (it's the default unit for line-height). So here "line-height: 1.4;" would be the right thing.

But em is not the default unit for line-height (see

On my system (Arch Linux, Firefox), this results in visible changes. As an example, here are 2 screenshots. First, we have the original em behavior (taken from the index for package fmt):

And here is the newer behavior following the removal of the ems:

The computed line-height went from 20.8px to 18.2px.

I find the original em version to be more readable. Since it looks like this visible change was inadvertent, could we add the em units back to lines 5 and 15?

@gopherbot gopherbot added this to the Unreleased milestone Aug 28, 2018

@kevinburke kevinburke self-assigned this Aug 28, 2018


This comment has been minimized.

Copy link

commented Aug 29, 2018

This is my fault. I gave @agnivade bad advice because I confidently mis-remembered how line-heights work and didn't notice the visual difference. Sorry!


This comment has been minimized.

Copy link

commented Aug 29, 2018

Right, there is indeed a difference. Good catch.

The MDN docs do recommend the line-height to be unitless however.

Perhaps, we can re-calculate the required line-height, and give a slightly higher number and still keep it unitless ?

@agnivade agnivade added the NeedsFix label Aug 29, 2018

@agnivade agnivade changed the title x/tools/godoc: some line-heights became less readable x/tools/cmd/godoc: some line-heights became less readable Aug 29, 2018


This comment has been minimized.

Copy link

commented Sep 9, 2018

Change mentions this issue: godoc: specify line-height is in em

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.