Utility focus ring not working #873
Replies: 1 comment 1 reply
-
Update: thanks to @Freddie on discord, I solved this one by changing to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I tried to create a focusRing utility like this:
focusRing: {
values: ['1px', '2px', '4px'],
shorthand: 'ring',
transform(value: string) {
return {
_focusVisible: {
outlineWidth: value,
outlineStyle: 'solid',
outlineColor: 'blue.500',
outlineOffset: value,
},
}
},
},
when I try to use it anywhere, Vscode does suggest this property. But it does not work, instead, it shows the default browser focus indicator. If I use just
_focusVisible: {
outlineWidth: '2px',
outlineStyle: 'solid',
outlineColor: 'blue.500',
},
then it works
Link to Reproduction
https://github.com/FilipePfluck/my-components
Steps to reproduce
go to globalCss.ts and try substituting the focus indicator css with the custom property
ring
run storybook
see it doesn't work
JS Framework
React (TS)
Panda CSS Version
0.4.0
Browser
No response
Operating System
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions