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

use offsetParent for correct position of children of statically positioned nodes #48

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

Conversation

Rich-Harris
Copy link
Owner

not ready for merge

Wild things start happening when you transform descendants of statically positioned nodes, because the absolute positioning (which is necessary to avoid insane layout glitches) is calculated on the wrong basis (node.parentNode rather than node.offsetParent). This fixes that, but it introduces another bug – if you have transformed nodes between the offset parent and the transformed node, the transforms aren't correctly applied.

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

Successfully merging this pull request may close these issues.

1 participant