Replies: 2 comments 1 reply
-
This is kind of similar to #1359. I'm unsure which is better between an explicit approach, e.g. something like I think either one would be possible, but I don't know if this would work well in all situations (APIs), as well as any potential type-safety consequences. This might've already been attempted in the past too, I wasn't around in the early days of Vanilla Extract, so there may be a reason why this hasn't been implemented already. |
Beta Was this translation helpful? Give feedback.
-
I think such an API would be easier to use?
|
Beta Was this translation helpful? Give feedback.
-
Let me know if this is already possible in some way that I've missed, but it would be really powerful if the following was possible:
Underneath this would need the ability to duplicate styles associated with an existing classname to a new one.
My end goal here is really to have a version of the recipes lib that would support responsive variants, bringing it closer to what stitches provides, but while remaining static. I've got the following POC API working locally (I'm keeping a copy of the styles passed in to recipe to reference inside responsive recipe):
But this breaks down when an existing class is passed to a variant, because I can't find a way to retrieve the styles objects for existing classNames at build time.
Beta Was this translation helpful? Give feedback.
All reactions