@apply arguments #11258
rebelwolfson
started this conversation in
Ideas
@apply arguments
#11258
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good time of day, everyone!
I beg my pardon in case there is the same issue already, but brief search gave me nothing similar.
So, I've recently encountered the issue, when I have css-variables name collision. Let's consider the following (simplified) situation:
And the following jsx:
So, problems here are following:
There are, obviously, workarounds, like having css vars be named differently or override TW utility classes in place. But these are all just avoiding the problem, because custom classes feel like some kind of functions of CSS. They encapsulates some semantic visuals, like, i.e.
my-kit-button
ormy-kit-active
... Thus, developer should not be obliged to know hidden implementation of these functions.It could be exceptionally great to have an ability to have some solution to this problem. For example, one could specify arguments to such class:
And then use it in the following way:
Or something like this... Obviously this is not only about css vars, but all the custom values. May be it is also worth to consider some default values for arguments in order to reduce boilerplate.
Again, I am sorry for rising this, in case it is already considered or have some obvious solution... And, as usual, thank you for such a great tool, it is a joy to work with it!
Beta Was this translation helpful? Give feedback.
All reactions