It's currently not possible to add a focus effect (like box-shadow) to a link
See original GitHub issueDescription
When I add a _focus style including a shadow to a link, I expect that style to be applied
Link to Reproduction
https://codesandbox.io/s/dazzling-haibt-vnr6u?file=/src/index.tsx
Steps to reproduce
- Add a link with a shadow
- Add the shadow to the _focus styles, too
- Click the link but make sure the link stays on page (this happens a lot in a Next.js app)
- The shadow disappears, and there is no way to keep it
Chakra UI Version
1.8.3
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
Add :not(.always-show-focus)
or something to the CSS reset and this is fixed immediately! Document the ability to do this, too. Perhaps generally the focus ring should be documented separately? I’m happy to write that if you want.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
box-shadow - CSS: Cascading Style Sheets - MDN Web Docs
The box-shadow CSS property adds shadow effects around an element's frame. ... If not specified, it will be 0 (the shadow's edge is...
Read more >How to achieve this effect on :focus - Stack Overflow
The text box is using a CSS3 box-shadow :. The CSS below will put the shadow effect on all text boxes on focus:...
Read more >box-shadow - CSS-Tricks
The box-shadow property in CSS is for putting shadows on elements (sometimes referred to as "drop shadows", ala Photoshop/Figma).
Read more >Box shadow for focus on element with border - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >Apply shadow or blur effects – Figma Help Center
They can enable you to signify that an element is interactive, like making ... As it's not possible to re-order effects, we recommend...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to create a PR I think - it’s an easy fix and should be perfectly backwards compatible.
Hi! This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs within 5 days. Thank you for your contributions.