Skip to content

Header: Use custom focus styling #3077

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

Merged
merged 1 commit into from
Dec 7, 2020
Merged

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 6, 2020

The current focus outline is using a rectangle, while the input is rounded, which looks very ugly. This commit uses a box-shadow instead of the regular outline to solve this issue.

Before:
Bildschirmfoto 2020-12-06 um 15 45 59

After:
Bildschirmfoto 2020-12-06 um 15 44 37
Bildschirmfoto 2020-12-06 um 15 44 55

r? @locks

The current focus outline is using a rectangle, while the input is rounded, which looks very ugly. This commit uses a `box-shadow` instead of the regular `outline` to solve this issue.
transition: box-shadow 150ms;

&:focus {
outline: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

does this not mess with accessibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

only if there is no visual alternative, which the shadow provides in this case

@locks
Copy link
Contributor

locks commented Dec 7, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Dec 7, 2020

📌 Commit 8f3b07f has been approved by locks

@bors
Copy link
Contributor

bors commented Dec 7, 2020

⌛ Testing commit 8f3b07f with merge 2d81921...

@bors
Copy link
Contributor

bors commented Dec 7, 2020

☀️ Test successful - checks-actions
Approved by: locks
Pushing 2d81921 to master...

@bors bors merged commit 2d81921 into rust-lang:master Dec 7, 2020
@Turbo87 Turbo87 deleted the focus-style branch December 7, 2020 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants