-
Notifications
You must be signed in to change notification settings - Fork 21
Consider non-grouped styles as base
#29
hennessyevan
started this conversation in
Ideas
In Stitches, we put "base" styles in the object like so
const RedBox = styled('div', { backgroundColor: '$red' })
In macaron, following vanilla-extract, we use the base keyword
const RedBox = styled('div', { base: { backgroundColor: '$red' } })
I'm not sure what the benefit of using base is here, perhaps there is some good reason but could we possibly support both syntaxes? It would surely make it just a little easier for our team to migrate from stitches to macaron.
All reactions
Replies: 1 comment 1 reply
Hey, so the main reason for having base here is that it allows you to use pre-defined styles/classes as the base styles for some element, so you can do
const RedBox = styled('div', { base: "some-class-name", })
We could support both syntaxes though
All reactions
1 reply
Oh that's cool 👍
When we get to it, I'll see whether we might just do a codemod and if we do, I'll contribute that codemod here of course
All reactions
-
👍 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment