-
I just rewrote a small project to use Stitches and I love it! There are still a few rough edges, but I really like the ideas behind this tool. For now, there is one thing that stands out to me the most. I was trying to figure out how to use
The common pattern that those solutions enable is to apply global styles conditionally; it's also clear when that happens - it's whenever those components render. In addition, when those components unmount, the styles disappear. If I understood correctly, neither the Would you be open to tackling this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@fatfisz hey! thanks so raising this :) I've moved it to a GH discussion so we can talk about and will then create an actionable issue if needed. For context: I'll lay out the API differences between latest css.global({
body: {
margin: 0
}
}) so in canary we changed it to: const globalStyles = css.global({
body: {
margin: 0
}
})
export const App = () => {
globalStyles()
return <div />
}
Never thought about this before. Why would global styled be conditionally applied? Doesnt that defeits the point of it being global?
I don't understand why this is a good idea - for global styles I'm curious to see what's your use case, and hopefully, we can understand it more and take that into account. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi! we've now released Stitches 0.1.0 and we have decided to stick with this API for now. Thanks! |
Beta Was this translation helpful? Give feedback.
Hi! we've now released Stitches 0.1.0 and we have decided to stick with this API for now. Thanks!