flowbite
flowbite copied to clipboard
Indeterminate Checkbox should not change on hover if disabled.
Describe the bug With Flowbite, only indeterminate checkboxes have a different style on hover. While inconsistent, this doesn't bother me, however, these checkboxes preserve this behaviour even when disabled, which makes them look like they can be interacted with, which I believe is against UI best practices enough to constitute a bug.
I believe the CSS selector on https://github.com/themesberg/flowbite/blob/main/plugin.js#L364 could be changed to:
[type='checkbox']:indeterminate:not(:disabled):hover,
[type='checkbox']:indeterminate:not(:disabled):focus {
border-color: transparent;
background-color: currentColor;
}
I did not open a PR because maybe you would prefer to fix it a different way (maybe removing the hover entirely since none of the other checkboxes have them), and I haven't forked the repo so far.
To Reproduce Steps to reproduce the behavior:
- Create a disabled indeterminate checkbox
- Move you mouse over it
Expected behavior Disabled elements should not change on hover
Screenshots
Not hover:
Hover: