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

rustdoc: make settings radio and checks thicker, less contrast #110205

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Apr 11, 2023

This is very dependent on subjectivity and what screen you use, but this change makes the radio buttons' outer circle less ugly.

This is because I could see the pixels very clearly, thanks to the very thin line and high contrast. This change makes both less severe, giving your browser's antialiasing algorithm more to work with. Since it's thicker, lowering the contrast shouldn't impact visibility.

Preview

https://notriddle.com/rustdoc-demo-html-3/pixelated-border/settings.html

Before

image

After

image

Original "after" image with 2px border around checked box

image

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

I like it for the radio buttons, not so much for the check-boxes. If it sounds ok, I'll approve it if you only change it for the radio buttons.

@notriddle
Copy link
Contributor Author

I'm not sure I like it with the check boxes having thinner and brighter borders than the radio buttons. It makes the radio buttons look "disabled" by comparison, since they're dimmer.

image

But, I agree that the "checked" box state looks odd with the thick grey border around it. If it solves the problem, maybe we could give the "checked" state a thin border, while leaving the "unchecked" ones with a thick border?

image

@GuillaumeGomez
Copy link
Member

Good idea! Let's go with thinner border for check-boxes only if they're checked.

@notriddle
Copy link
Contributor Author

@GuillaumeGomez Okay, I've pushed up the tweak, both changing the PR and the Preview.

@GuillaumeGomez
Copy link
Member

Could you add a GUI test for the border-width please? For the radio buttons and the check-boxes.

This is very dependent on subjectivity and what screen you use,
but this change makes the radio buttons' outer circle less ugly.

This is because I could see the pixels very clearly, thanks to the
very thin line and high contrast. This change makes both less
severe, giving your browser's antialiasing algorithm more to
work with. Since it's thicker, lowering the contrast shouldn't
impact visibility.
@notriddle
Copy link
Contributor Author

@GuillaumeGomez Sure, border width test added.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 12, 2023

📌 Commit ad9a89e has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Apr 12, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#110153 (Fix typos in compiler)
 - rust-lang#110165 (rustdoc: use CSS `overscroll-behavior` instead of JavaScript)
 - rust-lang#110175 (Symbol cleanups)
 - rust-lang#110203 (Remove `..` from return type notation)
 - rust-lang#110205 (rustdoc: make settings radio and checks thicker, less contrast)
 - rust-lang#110222 (Improve the error message when forwarding a matched fragment to another macro)
 - rust-lang#110237 (Split out a separate feature gate for impl trait in associated types)
 - rust-lang#110241 (tidy: Issue an error when UI test limits are too high)

Failed merges:

 - rust-lang#110218 (Remove `ToRegionVid`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b53817d into rust-lang:master Apr 12, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 12, 2023
@notriddle notriddle deleted the notriddle/pixelated-border branch April 12, 2023 22:23
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 22, 2023
…ndlekey, r=GuillaumeGomez

rustdoc: clean up settings.css and settings.js

`handleKey` was added in 9dc5dfb and 704050d because the browser-native checkbox was `display: none`, breaking native keyboard accessibility.

The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more.

[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics

The other, one line change to settings.css is follow-up to rust-lang#110205
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 22, 2023
…ndlekey, r=GuillaumeGomez

rustdoc: clean up settings.css and settings.js

`handleKey` was added in 9dc5dfb and 704050d because the browser-native checkbox was `display: none`, breaking native keyboard accessibility.

The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more.

[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics

The other, one line change to settings.css is follow-up to rust-lang#110205
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 23, 2023
…ndlekey, r=GuillaumeGomez

rustdoc: clean up settings.css and settings.js

`handleKey` was added in 9dc5dfb and 704050d because the browser-native checkbox was `display: none`, breaking native keyboard accessibility.

The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more.

[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics

The other, one line change to settings.css is follow-up to rust-lang#110205
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

5 participants