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

[Checkbox] - Review Issues with Colors on Focus #2607

Closed
avalanche1 opened this issue Jul 12, 2015 · 8 comments
Closed

[Checkbox] - Review Issues with Colors on Focus #2607

avalanche1 opened this issue Jul 12, 2015 · 8 comments
Milestone

Comments

@avalanche1
Copy link
Member

.slider and .toggle don't change color and remain grey if toggled by pressing enter or spacebar.
If you click anywhere on the page after that - color appears...
Don't know about regular .checkbox - needs testing.

@avalanche1
Copy link
Member Author

Also, if I toggle it by clicking, then tab away to next field, then tab back - instead of blue it becomes gray!

@jlukic
Copy link
Member

jlukic commented Jul 13, 2015

This seems to be an issue with browser being lazy at updating css with pseudo selectors like :checked. You can see in debugger although the element is already :checked the selector isnt applied until "something" happens. Usually hover over the checkbox.

@avalanche1
Copy link
Member Author

Ok, this causes this 'mystery':

/*--------------
  Active Focus
---------------*/

.ui.checkbox input[type="checkbox"]:indeterminate:focus ~ .box:before,
.ui.checkbox input[type="checkbox"]:indeterminate:focus ~ label:before,
.ui.checkbox input[type="checkbox"]:checked:focus ~ .box:before,
.ui.checkbox input[type="checkbox"]:checked:focus ~ label:before {
  background: #f9fafb;
  border-color: rgba(34, 36, 38, 0.35);
}

We sd remove gray background being applicable on focus.
Maybe use diff opacity for showing focus.

@jlukic jlukic changed the title [Checkbox] - Doesn't change color on kb toggle [Checkbox] - Review Issues with Colors on Keyboard Navigation Jul 13, 2015
@jlukic jlukic added this to the 2.0.4 milestone Jul 13, 2015
@jlukic jlukic changed the title [Checkbox] - Review Issues with Colors on Keyboard Navigation [Checkbox] - Review Issues with Colors on Focus Jul 14, 2015
@jlukic
Copy link
Member

jlukic commented Jul 16, 2015

This occured because of css specificity changes when i removed input[type="checkbox"] from :checked rules.

Resolving by adding activeFocus variables and styles.. fix coming shortly

@jlukic
Copy link
Member

jlukic commented Jul 17, 2015

Example from next with fixed checkbox focus
http://jsfiddle.net/65rgdhdo/

@jlukic jlukic closed this as completed Jul 17, 2015
@avalanche1
Copy link
Member Author

Nice!
But for active checkbox and slider there is no special styling when they have focus. So no way to determine if they are currently selected. (unlike toggle, which changes color slightly)

@jlukic
Copy link
Member

jlukic commented Jul 20, 2015

They change color subtly.

@avalanche1
Copy link
Member Author

🔬 ah, yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants