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

adjust sidebar link brightness #93231

Merged
merged 4 commits into from Jan 24, 2022
Merged

Conversation

conradludgate
Copy link
Contributor

@conradludgate conradludgate commented Jan 23, 2022

Fairly simple change. I've taken the existing link colour and main body background colours, and made sure that the sidebar+link contrast is the same.

ayu:

dark:

light:

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 23, 2022
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @notriddle (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 23, 2022
@GuillaumeGomez
Copy link
Member

Your new CSS rule doesn't seem to be applied on the current item. Is it voluntary? Here is what the output looks like:

Screenshot from 2022-01-23 10-27-45
Screenshot from 2022-01-23 10-39-11
Screenshot from 2022-01-23 10-38-46

@conradludgate
Copy link
Contributor Author

There seems to be a separate rule which defines the selected item colour:

.content span.trait, .content a.trait, .block a.current.trait { color: #b78cf2; }

Are you suggesting we should apply the same contrast scaling to these?

@GuillaumeGomez
Copy link
Member

If there is a contrast "problem" there as well, then yes.

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@notriddle notriddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to fix the sidebar.goml test case failure. Other than that, this looks great. Thanks!

/checkout/src/test/rustdoc-gui/sidebar.goml sidebar... FAILED
9846
Error:  (line 12) Error: Evaluation failed: expected `rgb(56, 115, 173)` for key `color` for selector `#all-types`, found `rgb(53, 109, 164)`: for command `assert-css: ("#all-types", {"color": "rgb(56, 115, 173)"})`

@jsha
Copy link
Contributor

jsha commented Jan 23, 2022

Very nice, thanks for working on this!

Related to: #93230

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 23, 2022

📌 Commit ca3d0e2 has been approved by notriddle

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2022
@GuillaumeGomez
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2022
…askrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#92513 (std: Implement try_reserve and try_reserve_exact on PathBuf)
 - rust-lang#93152 (Fix STD compilation for the ESP-IDF target (regression from CVE-2022-21658))
 - rust-lang#93186 (Fix link to CVE-2022-21658)
 - rust-lang#93188 (rustdoc: fix bump down typing search on Safari)
 - rust-lang#93212 (Remove unneeded cursor pointer rule on mobile sidebar)
 - rust-lang#93231 (adjust sidebar link brightness)
 - rust-lang#93241 (Fix brief appearance of rust logo in the sidebar)
 - rust-lang#93253 (Update theme on pageshow event)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ed1fea8 into rust-lang:master Jan 24, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 24, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 25, 2022
…illaumeGomez

minor fix for rust-lang#93231

In rust-lang#93231 I introduced the new sidebar colours to make the contrast more balanced and easier to read, but it seems I made a copy-paste error in the light theme, resulting in functions appearing green.

This one line change replaces that colour with it's corrected orange/brown colour.

I have double checked the rest of the colours and they seem ok. Sorry for the inconvenience
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#93250 (Remove deduplication of early lints)
 - rust-lang#93286 (Add white-space: nowrap to links in the sidebar)
 - rust-lang#93291 (minor fix for rust-lang#93231)
 - rust-lang#93300 (make Windows abort_internal Miri-compatible)
 - rust-lang#93303 (Fix ICE when parsing bad turbofish with lifetime argument)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants