Future of utilities #29
-
Hi! Loving what vanilla-extract is capable of so far. I've started to adopt it in a styled-components project making use of the CSS custom property features so far. Are there any plans to add additional helper functions, for example returning the "key" of a custom property i.e. "--my-var12321" instead of the version wrapped in "var(...)". I'll probably regex this for now as I'd like to use the value to override on a per component basis using the style attribute. I've had a look at the dynamic API but this seems somewhat redundant inside of a React context, would love to hear how you're currently using it with react in general too :) Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We could provide a We could also potentially add a higher level function that sets a single variable as an inline style object, as we currently only support setting entire themes as inline styles. |
Beta Was this translation helpful? Give feedback.
We could provide a
getVarName
function as part of thedynamic
package, which is currently a private util.We could also potentially add a higher level function that sets a single variable as an inline style object, as we currently only support setting entire themes as inline styles.