saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.18k stars 1.31k forks source link

bug: the background of `btn-disabled` (or disabled `btn`) should be transparent if combined with `btn-ghost` #3285

Open tats-u opened 3 days ago

tats-u commented 3 days ago

What version of daisyUI are you using?

4.12.x

Which browsers are you seeing the problem on?

Chrome, Firefox

Reproduction URL

https://codepen.io/tats-u/pen/wvVLOJE

Describe your issue

image

<div><a href="//example.com/edit" class="btn btn-ghost btn-circle">โœ</a> <span class="btn btn-ghost btn-disabled btn-circle">๐Ÿ—‘๏ธ</span></div>
<div><button type="button" class="btn btn-ghost btn-circle">โœ</button> <button type="button" disabled class="btn btn-ghost btn-circle">๐Ÿ—‘๏ธ</button></div>
<div><button type="button" class="btn btn-primary btn-circle">โœ</button> <button type="button" disabled class="btn btn-primary btn-circle">๐Ÿ—‘๏ธ</button></div>

the background of disabled ghost buttons (the top 2 rows) should be transparent instead of gray.

github-actions[bot] commented 3 days ago

Thank you @tats-u for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

saadeghi commented 3 days ago

Then it wouldn't be obvious that it's disabledโ€ฆ

We don't want users to click on a button and wonder why it's not working. It should look clearly disabled.

tats-u commented 1 day ago

Then it wouldn't be obvious that it's disabledโ€ฆ

https://codepen.io/tats-u/pen/eYqqLRg

The first one is sufficient. The disabled icons are sufficiently pale compared to active ones. I doubt users will mistakenly click them.

image image

The disabled icons in the last one look too obtrusive due to the gray background. We have to add ! before bg-transparent to remove the background.

tats-u commented 1 day ago

At least users will try placing the mouse pointer on the "disabled" buttons with gray background once.

tats-u commented 1 day ago

I haven't seen the disabled ghost buttons with such a solid gray background surrounded by active ghost buttons.