Conversation
🦋 Changeset detectedLatest commit: a910b89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/blockstack/blockstack-ui/HwTkdMN7VrdM5EaEVUE6v1QKBZCd [Deployment for a910b89 failed] |
kyranjamie
left a comment
There was a problem hiding this comment.
Thanks @aulneau—big improvement 💯
| ) as React.ReactElement[]; | ||
| } | ||
|
|
||
| export const selector = '& > *:not(:last-child)'; |
There was a problem hiding this comment.
You're not using this selector?
https://github.com/chakra-ui/chakra-ui/blob/main/packages/layout/src/stack.utils.tsx#L12
There was a problem hiding this comment.
Yeah, I tried it and it works if we wanted to do spacing for basically :not(:first-child), but that flips how things have been. Previously margins had been set to the right and bottom (for horizontal/vertical stack), and that selector would make it left, top. I noticed some interesting bugs where if certain things switched out, for a split second, spacing would be added to them. doing :not(:last-child) replicates the original behavior and works well in the wallet.
I'll test out *:not(style):not(:last-child) for SSR
This updates the
Stackcomponent to rely on CSS only, no longer passing props for spacing.