-
Notifications
You must be signed in to change notification settings - Fork 165
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
Suggestion: change padding-top & padding-bottom of the container #82
Comments
This is do-able, but I'm not clear on what the benefits would be. Have you tested the performance of this approach over the current approach? |
The benefit is that you are not using absolute positioning on the items, that means that the items will have native flow inside the container. |
You still need to provide exact height measurements for every single item, and you won't be able to use margin between the items, so I'm still not sure I see a clear benefit |
There is margin between items in Insta & as you see there is no explicit height on the container but it derived, so there is a possibility to allow overflow... And it still work! Additional benefite of native flow is the support for RTL in horizontal list for free. |
Think of it, it not requires |
Hi,
I've investigated how virtuallization of Instagram works and saw that they are not using
position: absolute
at the children & not updating children positioning / styles at all, instead they changingpadding-top
&padding-bottom
of the parent container! (SUPER COOOL 🤩).WDYT? can we refactor this lib to something similar?
The text was updated successfully, but these errors were encountered: