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

fix: don't unecessarily re-order elements #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ronag
Copy link

@ronag ronag commented Feb 20, 2020

Since the element layout uses absolut positioning the order does not matter. Avoid re-ordering.

@ronag ronag requested a review from bvaughn February 20, 2020 09:48
@deadbeef84
Copy link

This actually helps a lot when using css animations/transitions, since moving an element in the dom will reset its layout state preventing any animations unless you forcefully trigger a layout before applying the new style. When the dom-elements order is preserved, it's super easy to create masonry like animations using regular css transitions.

@EarthlingDavey
Copy link

EarthlingDavey commented Feb 10, 2021

This may be cause unwanted accessibility side effects. If you have tab-able html elements like buttons in the rows. I think they will be highlighted in the order of the DOM, not the visual order from top down.
My suggestion, have this as an option that is disabled by default. In the readme, caution developers about tab ordering and reference to tabIndex as a possible solution.

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