Option to use currentColor or other tailwind util classes for more components #2428
mister-simon
started this conversation in
Ideas / feature requests
Replies: 1 comment
-
I think when I was considering this, I had in mind the Radial Progress component. I hadn't yet checked the code for that out, but now that I have I see that it uses So I suppose, this is more of a request to expand the feature to more components, as it's a really valuable and intuitive feature. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While experimenting with the styled Range component, I ran into some limitations.
Specifically, it isn't possible to set arbitrary thumb colors (via the pseudo-element's box-shadow) in a simple way.
This lead me to a couple of potential approaches:
--tw-shadow-color
as a fallback, when--range-shdw
is not present.currentColor
, thereby allowingtext-...
utilities to set the basic track color instead.With the above ideas in mind, I would like to be able to do something like:
I suspect that this specific implementation would end up looking like:
If it proves possible / worthwhile, it might be possible to apply similar approaches to some of the other components that have custom
<element>-<daisy-color>
classes as their only available styles.I'm aware that this might be more of a sweeping change than it seems on face value, since Daisy seems to make pretty heavy use of hsl, and allowing other arbitrary colours through might end up complicating what is currently quite a streamlined style system.
In any case, I hope it's an idea worth considering even if it's not too feasible.
Or you might have a smarter solution or know something that I've missed in my search.
By the way - Really enjoying working with DaisyUI! Thanks for all the hard work :).
Beta Was this translation helpful? Give feedback.
All reactions