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/website: code snippets in the blog are a different font-size than content after migration #49833

Closed
theckman opened this issue Nov 28, 2021 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@theckman
Copy link
Contributor

Hello,

I found another regression in the website after migrating golang.org to go.dev. Specifically, the code snippets in blog posts are a much smaller font size than the text of the blog post itself. This makes the snippets very hard to read, and overall creates a pretty uncomfortable aesthetic on the page.

It looks like the issue is that the font-size for pre is set to 0.83em. It looks much better when setting it to 1.0em.

I've attached a screenshot showing the issue:

Screen Shot 2021-11-28 at 14 14 28

Here's what it looks like when setting the pre font-size to 1em:

Screen Shot 2021-11-28 at 14 17 35

@gopherbot gopherbot added this to the Unreleased milestone Nov 28, 2021
@theckman theckman changed the title x/website: code snippets in the blog are a different font-size than content after migration, hurting readability x/website: code snippets in the blog are a different font-size than content after migration Nov 28, 2021
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 30, 2021
@mknyszek
Copy link
Contributor

CC @dmitshur

@rsc rsc self-assigned this Nov 30, 2021
@rsc
Copy link
Contributor

rsc commented Nov 30, 2021

Easy fix, will mail shortly.

@gopherbot
Copy link

Change https://golang.org/cl/367974 mentions this issue: _content/css: fix <pre> font size

@rsc rsc removed their assignment Jun 23, 2022
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
Should use rem, not em.
Otherwise code blocks like on go.dev/blog/context have text that is too small.

Fixes golang/go#49833.

Change-Id: Ib8b3ca6385dd1e0e3ce7861ea23e3e5d68ea21ed
Reviewed-on: https://go-review.googlesource.com/c/website/+/367974
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants