Making WordPress.org

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#7674 closed defect (bug) (fixed)

New Trac text line-height hinders readability

Reported by: ironprogrammer's profile ironprogrammer Owned by:
Milestone: Priority: normal
Component: Trac Keywords:
Cc:

Description

The text line-height in Trac recently increased to 1.875 (I'm not sure when). For my eyes, this makes it harder to read, as the separation of lines and blocks of text are so similar.

After a little spelunking, in https://s.w.org/style/trac/wp-trac.css?218, this value is set to 1.4 (that inline comment isn't mine, but I agree wholeheartedly! 😂):

body, th, tr {
        line-height: 1.4; /* I don't know how you people read without this */
}

But this value is being overridden by inline CSS:

:root :where(body) {
        line-height: var(--wp--custom--body--typography--line-height);

where

--wp--custom--body--typography--line-height: 1.875;

This affects all of the text in Trac (including headers and footers), and I feel that override should be isolated to the site chrome that needs it (if any), and letting the previous wp-trac.css setting do its thing. I've personally used `1.5` line-height for the majority of agency work I've been involved with, which could be a compromise if increasing the line-height here was intentional.

Visual Example

line-height: 1.875 🔴 line-height: 1.4 🟢
https://cldup.com/UbvdKcPp3n-3000x3000.jpeg https://cldup.com/Mvg6poqS2P-3000x3000.png

Change History (5)

#1 @azaozz
4 weeks ago

this makes it harder to read

Same here. This seems to be an accident rather than intended, just not sure how easy it would be to fix (unsure if that body class should be/can be removed).

#2 @dd32
4 weeks ago

In 13817:

Trac: Update Templates. See #7674.

#3 @dd32
4 weeks ago

In 13818:

Trac: Force line-height back to 1.4.

See #7674.

#4 @dd32
4 weeks ago

  • Resolution set to fixed
  • Status changed from new to closed

I'm not sure when it changed, but it was in the last week, as I too noticed it (but hadn't dug into it, thinking I broke something just for me - figuring that someone would make a ticket like this if it affected others...)

Looking at the template diffs, I don't see when it was pulled in, and looking at the GitHub logs for the WordPress.org header styles, I can't find anything that's not years ago that would affect it..

The above changeset seems to have fixed it for me, but Trac caches it's templates, so it might be a few hours before each Trac instance updates (and even then, each Trac thread has it's own cache.. so it might flip back and forth a bit).

#5 @ironprogrammer
4 weeks ago

Yay, thanks, @dd32! I already see it here in Meta Trac.

This fix has also resolved the .time-ago alignment:

https://cldup.com/FwyKWL8zxL.png

Note: See TracTickets for help on using tickets.