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

Remove Focus rings on buttons #174

Open
sami-azzam opened this issue Jun 18, 2022 · 8 comments
Open

Remove Focus rings on buttons #174

sami-azzam opened this issue Jun 18, 2022 · 8 comments
Labels
enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0

Comments

@sami-azzam
Copy link

sami-azzam commented Jun 18, 2022

Is your feature request related to a problem? Please describe.

I really like Hope UI, it seems like the best UI library for Solid atm.
However, I personally dislike the focus rings on buttons, I prefer the way Mantine handles it as an example.

Describe the solution you'd like

It would be great if focus rings on buttons were to be removed.
In Mantine, focus rings only show when navigating with the keyboard, which is much cleaner in my opinion.

Describe alternatives you've considered

  • When using React: Mantine,
  • When using Solid: manually trying to figure it out in CSS using Hope UI

Additional Notes

One more (less important) thing... Is there a way to change the style of focus rings on text input components?

Looking forward to your response

@fabien-ml
Copy link
Collaborator

fabien-ml commented Jun 18, 2022

Hi, It's already planned in the 1.0 rewrite. Hope UI will use solid-aria focus ring primitive which show focus ring only with keyboard navigation.

@fabien-ml fabien-ml added enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0 labels Jun 18, 2022
@fabien-ml
Copy link
Collaborator

For the input focus style you can use the _focus or css props to override it but it will not be applied globally. Please note that the style props API will be removed in 1.0 in favor of plain old CSS.

@sami-azzam
Copy link
Author

sami-azzam commented Jun 18, 2022

Hi, It's already planned in the 1.0 rewrite. Hope UI will use solid-aria focus ring primitive which show focus ring only with keyboard navigation.

Great to hear that, thanks!

@danielo515
Copy link

Is there any way to opt-out of the _hover stiles applied? I don't want to override them, because then I will be having the same problem of sticky background colors. What I want is to not have any style applied on hover for any variant, so I can use the _active selector that works better on mobile

@fabien-ml
Copy link
Collaborator

No its not possible, hover styles of button are "hard coded" in the button.styles.ts. The only solution is to override the styles with _hover or css prop.

@danielo515
Copy link

danielo515 commented Jul 11, 2022 via email

@fabien-ml
Copy link
Collaborator

Yeah i understand, you've reach the point of "that's too cumbersome to customize to fit my need" 😅. The library is not that customizable.

@fabien-ml
Copy link
Collaborator

Update, in 1.0 the focus behavior is the same as in Mantine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0
Projects
None yet
Development

No branches or pull requests

3 participants