Recipes with Sprinkles best practices #562
Unanswered
MarcoDaniels
asked this question in
Q&A
Replies: 1 comment
-
hi, new VE user here. I've divided // box.css.ts
const box = defineProperties({
properties: {
display: ['none', 'block', 'inline-block', 'flex', 'inline-flex'],
position: ['relative', 'absolute', 'fixed', 'sticky'],
flexDirection: ['row', 'column', 'row-reverse', 'column-reverse'],
flexGrow: [0, 1, 2, 3, 4, 5],
...
}
})
export default createSprinkles(box) // text.css.ts
const properties = defineProperties({
properties: {
fontFamily: fonts,
fontWeight: fontWeights,
lineHeight: lineHeights,
letterSpacing: letterSpacings,
textAlign: ['left', 'center', 'right'],
...
}
})
const responsiveProperties = defineProperties({
defaultCondition: 'initial',
conditions: {
initial: {},
sm: { '@media': media.sm },
md: { '@media': media.md },
...
},
properties: {
fontSize: fontSizes
}
})
export default createSprinkles(properties, responsiveProperties) dividing |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi 👋
I'm looking for some opinions in best practices on using recipes and sprinkles.
Currently I have one "big" sprinkles that defines all the possible style utilities with media query conditions, something like:
then I use this
styles
sprinkle to create a recipe like:Now I'm just wondering if this can have any performance/design issues in terms of how many class names it will create due to the raising complexity of the
recipe
?Beta Was this translation helpful? Give feedback.
All reactions