rust icon indicating copy to clipboard operation
rust copied to clipboard

Fix item-info color

Open GuillaumeGomez opened this issue 3 years ago • 14 comments

Part of #98341 (the final fix is #93896).

Since the links are already underlined, no need to change their color too. Instead it now uses the text color directly.

Here are some screenshots of the result:

Screenshot from 2022-07-26 15-16-28 Screenshot from 2022-07-26 15-16-33 Screenshot from 2022-07-26 15-16-39

Online demo available here.

cc @jplatte @jsha r? @notriddle

GuillaumeGomez avatar Jul 26 '22 13:07 GuillaumeGomez

@bors r+ rollup

notriddle avatar Jul 26 '22 14:07 notriddle

:pushpin: Commit 262a48d86c22e36d76892c5a4dce53f8ca00cc73 has been approved by notriddle

It is now in the queue for this repository.

bors avatar Jul 26 '22 14:07 bors

@bors r-

This is the wrong solution for https://github.com/rust-lang/rust/issues/98341. The link color means something: you can click here. We should avoid creating exceptions if at all possible. The background for item-infos does not mean anything special. We can choose it to be whatever we want.

The problem here is that the link color in dark theme is chosen to contrast against the dark background, so it's light. But the background for the item-info is also light - too light, in fact. See https://github.com/rust-lang/rust/pull/93896. In that PR we never landed on the exact color, but that's the direction I think we should go. The text in the item info should be the same color as the body text, and the background should be just different enough from the body background to highlight it, without making it too bright.

jsha avatar Jul 26 '22 15:07 jsha

I completely forgot about it and I also prefer your approach. Closing this one then!

GuillaumeGomez avatar Jul 26 '22 15:07 GuillaumeGomez

@jsha I just realized that this fix is still valid, even though incomplete. It makes the <a> elements' color inherit their parent one. The one you set in https://github.com/rust-lang/rust/pull/93896. I'm reopening this PR and removing the "fixes" part in the first comment as it is incomplete but still an improvement and will be needed for your PR as well.

GuillaumeGomez avatar Jul 26 '22 18:07 GuillaumeGomez

It makes the elements' color inherit their parent one.

That's usually not what we want. For instance: a paragraph of text might have color: black. If there's a link in that paragraph we want it to have a distinct color, not black. So it shouldn't inherit it's parent's color.

jsha avatar Jul 27 '22 05:07 jsha

Ok. I'll wait for your PR to be done and then I'll update the links' color for item info elements.

GuillaumeGomez avatar Jul 27 '22 09:07 GuillaumeGomez

Blocked on https://github.com/rust-lang/rust/pull/93896 for the time being.

GuillaumeGomez avatar Jul 31 '22 12:07 GuillaumeGomez

:umbrella: The latest upstream changes (presumably #100048) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Aug 02 '22 09:08 bors

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

rustbot avatar Sep 24 '22 13:09 rustbot

I uploaded the result here.

GuillaumeGomez avatar Sep 24 '22 13:09 GuillaumeGomez

cc @jsha (sorry, forgot to ping you)

GuillaumeGomez avatar Sep 30 '22 11:09 GuillaumeGomez

Hello @GuillaumeGomez! There's a merge conflict for this PR, has there been any updates? :)

anden3 avatar Apr 22 '23 17:04 anden3

Still waiting for review.

GuillaumeGomez avatar Apr 22 '23 22:04 GuillaumeGomez