Skip to content

bug: Missing background color for indeterminate checkboxes #3979

Description

@ethingelstad

Reproduction URL (Required)

https://stackblitz.com/edit/daisyui5-lhngeyg5?file=src%2Fmain.js%3AL19

What version of daisyUI are you using?

v5.0.43

Which browsers are you seeing the problem on?

Edge, Firefox

Describe your issue

Indeterminate checkboxes with a checkbox-xxx class for color (i.e. checkbox-primary) have the dash almost invisible for some colors. It happens to different colors for light and dark theme.
It seems to happen when the --color-xxx-content color is close to the screen background (base-content?).
Checked checkboxes are good because there is a rule for '.checkbox:checked, .checkbox[aria-checked="true"]' that gives 'background-color: var(--input-color);'

I believe this can be fixed in src/components/checkbox.css by copying line 40 "background-color: var(--input-color, #0000);" and inserting it after line 64 "&:indeterminate {". This is quick, so if you just do it without assigning me to the task and making me create a pull request, I'm fine with that.

I don't have a stackblitz account, so in case the link isn't valid, here is the code: stackblitz.txt

Thanks for daisyUI! It does a much better job than I could have done myself.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions