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

add :focus-visible global styles with polyfill #165

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

gupta-ji6
Copy link
Contributor

@gupta-ji6 gupta-ji6 commented Oct 4, 2021

Description

You already have a default :focus style in GlobalStyle.js. This PR adds the new :focus-visible style, which only adds focus styles when the user navigates with the keyboard, not the mouse.

Screenshots

Before

Kapture 2021-10-04 at 15 50 49

After

Kapture 2021-10-04 at 15 52 21

References

  1. WICG/focus-visible
  2. :focus-visible and backwards compatibility

Live Test

I use these styles in my portfolio, you can test how this works here for a quick look.

P.S.

Thank you for building such a great portfolio and open souring it :)
I totally understand if these changes don't suit your needs. I raised a PR thinking it might be a good add-on. I will happy to if I contributed to something I have been using myself for a long time.

@netlify
Copy link

netlify bot commented Oct 4, 2021

✔️ Deploy Preview for brittanychiang ready!

🔨 Explore the source changes: cc18294

🔍 Inspect the deploy log: https://app.netlify.com/sites/brittanychiang/deploys/615ad657349cfb00082dd446

😎 Browse the preview: https://deploy-preview-165--brittanychiang.netlify.app

@gupta-ji6 gupta-ji6 changed the title add focus-visible global styles with polyfill add :focus-visible global styles with polyfill Oct 4, 2021
eloraschoerverth pushed a commit to eloraschoerverth/eloraschoerverth.github.io that referenced this pull request Nov 6, 2021
@bchiang7 bchiang7 merged commit ebfef18 into bchiang7:main Nov 22, 2021
@gupta-ji6 gupta-ji6 deleted the css/focus-visible-polyfill branch November 23, 2021 04:03
mechakin pushed a commit to mechakin/portfolio that referenced this pull request Oct 16, 2023
…fill

add :focus-visible global styles with polyfill
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.

2 participants