daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

Indeterminate checkbox background color

Open s-montigny-desautels opened this issue 3 years ago โ€ข 4 comments

Hi!

The background colour seems to not be set for the indeterminate checkbox. This is what it looks like when I use the checkbox inside a table image

I think the indeterminate pseudo-class is missing for each colour of the checkbox.

s-montigny-desautels avatar Nov 04 '22 00:11 s-montigny-desautels

Do you see this issue here too?
Are you using any other CSS package or plugin that may apply styles to a checkbox?

saadeghi avatar Nov 04 '22 00:11 saadeghi

Yes, I see this issue in the codepen. It's subtle, but there is a black border around the checkbox.

Here is with Google Chrome image

Here is with Firefox image

When the checkbox is checked, it look like this image

I'm only using DaisyUI with Tailwindcss for the CSS.

s-montigny-desautels avatar Nov 04 '22 13:11 s-montigny-desautels

I can't see the issue unfortunately. Tested on Android, iOS and tested on MacOS with Chrome, Safari, Edge and Firefox.

Can you try it on incognito mode with all plugins disabled? I want to make sure Chrome plugins are not affecting the style.

Also, please tell me What OS and which Chrome version you're using.

saadeghi avatar Nov 05 '22 16:11 saadeghi

I'm using Chrome 107.0.5304.87 on Fedora 37. I see the issue in Incognito. I see the issue on my phone too, wich is a Samsung S20 on android 12 using Google Chrome.

On a mac, at first, I didn't see the issue. But when I changed the zoom, I started to see it sometimes. I've managed the find a workaround for my project. I've added those components in my tailwind config.

addComponents({
	".checkbox": {
		"&-primary": {
			"@apply indeterminate:!bg-primary": {},
		},
		"&-secondary": {
			"@apply indeterminate:!bg-secondary": {},
		},
		"&-accent": {
			"@apply indeterminate:!bg-accent": {},
		},
		"&-success": {
			"@apply indeterminate:!bg-success": {},
		},
		"&-info": {
			"@apply indeterminate:!bg-info": {},
		},
		"&-warning": {
			"@apply indeterminate:!bg-warning": {},
		},
		"&-error": {
			"@apply indeterminate:!bg-error": {},
		},
	},
});

s-montigny-desautels avatar Nov 07 '22 15:11 s-montigny-desautels