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
As of now, I examined the component called Vanilla Extract that I discovered, did something on it, and came across a nice feature that is in Vanilla Extract and should be in Stitches.
Instead of Media's field in Stitches in Normal, Conditions in Vanilla Extract should be like this;
Currently, we only add Media queries in Media, but we also need Pseudo Conditions such as Hover, Focus, FocusWithIn, and Disabled.
Separate variants must be created for Hover, Focus, etc…. But if I have already defined Black, Violet, and Red in Color, creating separate variants for its Pseudo Conditions creates an unnecessary chunk of code.
I hope I was able to explain. Maybe we can do this by expanding Media's, but there will be a need for a document on this.
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
-
Hi Everyone,
As of now, I examined the component called Vanilla Extract that I discovered, did something on it, and came across a nice feature that is in Vanilla Extract and should be in Stitches.
Instead of Media's field in Stitches in Normal, Conditions in Vanilla Extract should be like this;
Currently, we only add Media queries in Media, but we also need Pseudo Conditions such as Hover, Focus, FocusWithIn, and Disabled.
For example;
if there are conditions instead of media
Usage example;
As I said, I was inspired by Vanilla Extract and I think it makes it very easy to use. https://vanilla-extract.style/documentation/sprinkles-api/
It is defined globally.
Well, if we need to give an example in the existing structure, for example, I do it this way.
Separate variants must be created for Hover, Focus, etc…. But if I have already defined Black, Violet, and Red in Color, creating separate variants for its Pseudo Conditions creates an unnecessary chunk of code.
I hope I was able to explain. Maybe we can do this by expanding Media's, but there will be a need for a document on this.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions