Comments (4)
@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 className
is a common pattern, particularly where the child component may be provided by a 3rd party library so can't be styled any other way. (Even within Material-UI we consume and in some cases restyle our own components to build up more complex components.)
This may not be a solvable problem, but just wanted to add some support to the issue.
from react-overdrive.
@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 body
level so styles still apply.
There could be a solution to use getComputedStyle
on all child elements and capture their styles, but this could be costly (especially for deeply nested DOM trees). I'll try to play with that idea.
from react-overdrive.
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 body
element).
from react-overdrive.
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.
from react-overdrive.
Related Issues (20)
- Include nextgram-overdrive demo in demos
- Broken images on demo website HOT 2
- Add Changelog HOT 1
- AnimationEnd Event HOT 2
- Make unmount requirement optional HOT 1
- Nested overdrive animations HOT 1
- Not an issue: Big thank you only! HOT 1
- Broken links HOT 1
- Custom ease ? HOT 2
- Are there similar libraries out there that you could recommend for non React projects? HOT 1
- How do I delete issue rather than Close
- Add support for react 15 and don't use unstable method HOT 1
- Homepage is down
- Support for React 16.3 and Portal ? HOT 2
- Demos in project are failing HOT 4
- Library maintence? Point to alternatives? HOT 1
- Website is down
- Transitioning components with React-router Links HOT 1
- React throws warning for unsafe componentWillReceiveProps HOT 1
- Translate animation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-overdrive.