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

Change radio button outline on :focus from square to circle #278

Open
adamerose opened this issue Dec 23, 2021 · 14 comments
Open

Change radio button outline on :focus from square to circle #278

adamerose opened this issue Dec 23, 2021 · 14 comments
Milestone

Comments

@adamerose
Copy link

Ideally this teal border should be circular:
image

It looks to me like water.css is using a box-shadow in place of outline for the focus styling like described here, but this doesn't seem to work on radio buttons. The only work around I found was this answer with -webkit-appearance: inherit; but this breaks the radio button appearance and requires some manual restyling.

So I'm looking for discussion here on alternatives or viability of -webkit-appearance: inherit; before I make a PR.

@rerfan24
Copy link

why don't you use

.radio:focusd {
  border-radius: 50%;
}

would'nt it work?

@adamerose
Copy link
Author

@rerfan24 border-radius doesn't work on box shadows, which is what water.css uses for the blue outline. If you inspect the radio button on the water.css demo page you can see it already does have this style but is not rounded:

input[type=radio] {
    border-radius: 100%;
}

The 2nd link in the OP is a jsfiddle showing this too

@shagungarg0
Copy link

can i work on this issue??

@u0nel
Copy link

u0nel commented Jan 13, 2022

If you inspect the radio button on the water.css demo page you can see it already does have this style but is not rounded

image

It works with Firefox on Linux

@adamerose
Copy link
Author

If you inspect the radio button on the water.css demo page you can see it already does have this style but is not rounded

image

It works with Firefox on Linux

It's round for me too on Windows Firefox. It's square on Chrome and Edge

@kognise
Copy link
Owner

kognise commented Jan 19, 2022

That's super weird, if anyone wants to make a PR I'll merge ASAP. Otherwise I can try to find time and fix this myself.

@kognise
Copy link
Owner

kognise commented Jan 20, 2022

Did some snooping around - I have absolutely no idea how to fix this. Gonna consider bring fully custom checkboxes back in a major 3.0 release.

@kognise kognise added this to the 3.0.0 milestone Jan 20, 2022
@asrvd
Copy link

asrvd commented May 13, 2022

can't we just remove the shadow, it's not like it's something very important.

@adamerose
Copy link
Author

can't we just remove the shadow, it's not like it's something very important.

Having a visual indicator that an item is focussed is important for users who use the tab key to cycle through inputs instead of using a mouse.

@asrvd
Copy link

asrvd commented May 14, 2022

can't we just remove the shadow, it's not like it's something very important.

Having a visual indicator that an item is focussed is important for users who use the tab key to cycle through inputs instead of using a mouse.

It's quite easy to distinguish between a focused radio button and non focused one without an outline too.

@u0nel
Copy link

u0nel commented May 15, 2022

how? checked is not the same as focused.

@SUJAL8
Copy link

SUJAL8 commented Oct 12, 2022

Please assign this issue to me.

@lunarfusion
Copy link

@kognise See if my solution works for you. #316

@JuiPuranik
Copy link

Im intrested in working on this issue. could you please assign this issue to me?

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

No branches or pull requests

9 participants