Replies: 1 comment 2 replies
-
The workaround I use for this kind of thing, is to just pull out the styles like this: const successStyles = css.raw({
'&[data-type="success"]': {
// styles
}
}); And then you can use it like: export const recipe = defineRecipe({
base: successStyles,
variants: {
variant: {
solid: successStyles,
},
},
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
It would be helpful to support recipe-specific conditions, similar to the global conditions feature, but scoped to individual recipes.
Problem Statement/Justification
When building recipes, it's common to apply one-off selectors like
&[data-type="success"]
. Currently, these have to be repeated multiple times throughout the recipe, which adds duplication and makes the recipe harder to maintain.Example:
Proposed Solution or API
Allow recipes to define local conditions that can be reused across the recipe.
Benefits:
Alternatives
No response
Additional Information
Beta Was this translation helpful? Give feedback.
All reactions