-
Notifications
You must be signed in to change notification settings - Fork 4
Is group-disabled:no-hover possible? #13
Comments
@kctdfh The variants: {
backgroundColor: ['group-disabled', 'group-hover'],
}, ...then variants: {
backgroundColor: ['group-hover', 'group-disabled'],
}, If that still doesn't work, could you please provide me an example project? |
@benface Thanks for taking the time! That makes a lot of sense! I thought the trick was to put the ones that take precedence first in the variants array. However, it still doesn't seem to work. Have a look here: https://play.tailwindcss.com/kZ4sSKFiEQ 'group-disabled' is always placed last but the group-disabled input's group-hover background color is still triggered when the '.group' is disabled! The only way I can make it work is by adding "!important' to the background color of the input (it's commented out by default and I've placed it at the end of the CSS page). Sorry the config is a little large. I tried to make it a bit smaller. Also the icons won't load in Tailwind Play but that shouldn't matter. |
@kctdfh Oh you're using But that's just a workaround, and the source of the problem is The reason it's not working is that unlike Closing this issue since it's not actually a problem with the plugin, but feel free to continue the discussion if you want. :) |
Sorry @benface for not catching this earlier! But thanks a lot! It clarifies a lot of things for me! |
I have a
<fieldset>
element (with .group) with two buttons and an input element in it. The input has group-hover (background color) applied but the buttons don't (they have individually applied hover: classes). I also have group-disabled applied to change the background color of all elements.Now when the
<fieldset>
is disabled, I have the group-disabled background color applied to everything but group-hover background color change is also being triggered when I hover the group.I need no-hover and group-disabled applied at the same time, it seems. I would be good to have a group-disabled-no-hover class added to the plugin. I tried adding it but can't get it working right.
The text was updated successfully, but these errors were encountered: