Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack with wrap has misaligned childs #67

Open
Kashargul opened this issue Jan 23, 2025 · 3 comments
Open

Stack with wrap has misaligned childs #67

Kashargul opened this issue Jan 23, 2025 · 3 comments

Comments

@Kashargul
Copy link
Contributor

Kashargul commented Jan 23, 2025

When using Stack in combination with wrap, the second and all following rows of childs will be misaligned from the first.

<Stack wrap="wrap" justify="center">
        <Stack.Item basis="31%">
          <Button fluid>Button1</Button>
        </Stack.Item>
        <Stack.Item basis="31%" grow={1}>
          <Button fluid>Button2</Button>
        </Stack.Item>
        <Stack.Item basis="31%">
          <Button fluid>Button3</Button>
        </Stack.Item>
        <Stack.Item basis="31%">
          <Button fluid>Button4</Button>
        </Stack.Item>
        <Stack.Item basis="31%" grow={1}>
          <Button fluid>Button5</Button>
        </Stack.Item>
        <Stack.Item basis="31%">
          <Button fluid>Button6</Button>
        </Stack.Item>
      </Stack>

Is this behaviour intentional? I didn't see it with Flex before.

Image

@AyIong
Copy link
Contributor

AyIong commented Jan 24, 2025

Yeah, that's normal Stack.Item behavior
With Stack it add's margin left on every item except first one, with Stack vertical it adds margin-top

It is not possible to use gap yet, as 516 is not yet finally released

@Kashargul
Copy link
Contributor Author

Yeah, that's normal Stack.Item behavior With Stack it add's margin left on every item except first one, with Stack vertical it adds margin-top

It is not possible to use gap yet, as 516 is not yet finally released

Gap looks promising, maybe we should test it on a proper beta release though before everyone jumps to 516.

Image

@AyIong
Copy link
Contributor

AyIong commented Jan 24, 2025

Yeah, that's normal Stack.Item behavior With Stack it add's margin left on every item except first one, with Stack vertical it adds margin-top
It is not possible to use gap yet, as 516 is not yet finally released

Gap looks promising, maybe we should test it on a proper beta release though before everyone jumps to 516.

Image

I already have it ready on my branch. But not sure it is time to open PR.
Wanna replace margin with gap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants