Skip to content

Work with aggressive CSS transitions #83

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

Merged
merged 1 commit into from
Jan 31, 2016
Merged

Work with aggressive CSS transitions #83

merged 1 commit into from
Jan 31, 2016

Conversation

xzhayon
Copy link

@xzhayon xzhayon commented Jan 22, 2016

Allow the sensor to work on very small elements (usually it needs to wait for some size to be reached, at least scrollbar width). Also, prevent 'expand' child from inheriting CSS transitions (which would possibily break the sensor by animating its size updates).

@marcj
Copy link
Owner

marcj commented Jan 27, 2016

Hey! Very nice found, thanks for your contributions. Unfortunately I've merged another PR which broke this one in the way I can't merge it through github. Could you please rebase your pull-request? :) I would very like to merge this beauty.

@xzhayon
Copy link
Author

xzhayon commented Jan 28, 2016

Here it is. I think 30px are not needed anymore (1px might be enough), yet I find it to be a safe value.

@marcj
Copy link
Owner

marcj commented Jan 28, 2016

Would you like to adjust your pull-request to 1px?

If its size update were animated, the element could become smaller
than its parent, thus making impossible to scroll 'expand' to bottom
on further 'scroll' events and breaking the sensor.
@xzhayon
Copy link
Author

xzhayon commented Jan 28, 2016

Even better: I've tested it again with the fix to #63 and there's no more need for extra space, any 1px change is correctly detected starting from an empty sensor.

@xzhayon xzhayon changed the title Work on any size, with aggressive CSS transitions Work with aggressive CSS transitions Jan 28, 2016
@marcj
Copy link
Owner

marcj commented Jan 29, 2016

Oh that sounds perfect, then we could close this PR? :)

@xzhayon
Copy link
Author

xzhayon commented Jan 30, 2016

Yeah, please, pull it in. :)

@marcj
Copy link
Owner

marcj commented Jan 30, 2016

I actually meant with closing this PR that we're not going to merge it :D I thought there's no need anymore. Does transition: 0s; fix something else?

@xzhayon
Copy link
Author

xzhayon commented Jan 31, 2016

Sure it does, as expressed in the text above and in the commit message. ;)

marcj added a commit that referenced this pull request Jan 31, 2016
Work with aggressive CSS transitions
@marcj marcj merged commit 608d783 into marcj:master Jan 31, 2016
@marcj
Copy link
Owner

marcj commented Jan 31, 2016

Alright, here we go. Thanks!

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.

2 participants