-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Default margins #152
Comments
Yep, output in your demos is correct. Keep in mind that Ink operates in the terminal, where there are no pixels. Vertical and horizontal margins will never look the same, because Ink uses a space for horizontal margins and an empty line for vertical margins. |
You can reproduce the same output via |
@vadimdemedes We should at least document that. I think horizontal margin needs to be 3 times vertical margin to look even (at least that's what I'm using in |
Agree.
Hm, how would you have 1 space margin in that case? E.g. <Box>
<Box marginRight={1}>X</Box>
Y
</Box> => |
You wouldn't. One vertical space is the same as three horizontal spaces. |
But if there was no ability to create 1 or 2 space horizontal margins, you wouldn't be able to create a layout like https://twitter.com/vadimdemedes/status/1103345757434736641 without using |
I'm not saying that Ink should handle this (It shouldn't). Just sharing my experience from creating |
My concern here isn't about the specific size. Rather, when an explicit |
Oooh I didn't get that. Will look into it, @duncanbeevers! |
This seems to be the same issue as #228, where Ink didn't unset props properly. Will be fixed in the next release. |
Fixed in |
Margins seem to be behaving inconsistently.
Let me know if I'm misunderstanding something here, but it seems like the behavior of these two examples should be equivalent.
Example 1 – Correct margins
Example 2 – Incorrect margins
Is this expected behavior? Am I holding it wrong?
The text was updated successfully, but these errors were encountered: