You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vanilla Extract is really a great idea in the CSS-in-JS world!
I am trying to integrate Vanilla Extract to my project. We currently have this kind of component code style, which combines the React component and its styles.
However, it is required to write those styles in a separated .css.ts file in Vanilla Extract. I tried the above pattern but the compiler removed rest of the codes.
In a more general way, is there any chance to allow arbitrary code inside .css.ts, or compile outside .css.ts? For example, use babel (or anything) to replace Vanilla Extract directives to plain JavaScript object. It produces the code below:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Vanilla Extract is really a great idea in the CSS-in-JS world!
I am trying to integrate Vanilla Extract to my project. We currently have this kind of component code style, which combines the React component and its styles.
However, it is required to write those styles in a separated
.css.ts
file in Vanilla Extract. I tried the above pattern but the compiler removed rest of the codes.In a more general way, is there any chance to allow arbitrary code inside
.css.ts
, or compile outside.css.ts
? For example, use babel (or anything) to replace Vanilla Extract directives to plain JavaScript object. It produces the code below:Beta Was this translation helpful? Give feedback.
All reactions