-
Notifications
You must be signed in to change notification settings - Fork 85
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
CSS styles are applied only after element is revealed #18
Comments
While the animation takes place, the elements are clones and moved without their wrapping elements. So while it inherits the size & position, it may lose colors, text-alignment that is styled on the parent elements. I suggest adding the colors and text-align to the element itself (via CSS) (or to the |
@berzniz Love the concept - this is the first library I've found that could solve the problem of how to achieve complex multi-element transitions such described for Material Design: https://material.io/guidelines/motion/material-motion.html#material-motion-what-makes-a-good-transition However, passing styling from a parent to child, through props or CSS This may not be a solvable problem, but just wanted to add some support to the issue. |
@mbrookes - these are some good points. Since the elements are cloned and attached to the body, they will indeed lose all CSS rules inherited from their parents. Usually frameworks (such as bootstrap) are working on the There could be a solution to use |
This could be partly solved by specifying a "root" element to nest the clones under. If the root doesn’t have position applied the absolute positioning should still work, but some CSS cascade would apply. |
I transition an image into a headline.
The basis is the default create-react-app setup: https://github.com/joetm/overdrive-test
What I notice is that the style of the headline is not applied immediately.
I see the headline appear with black text left-aligned. Then it jumps to being center-aligned with white text.
Anything that can be done in this case?
The text was updated successfully, but these errors were encountered: