Box-shadows only render once the animation completes
See original GitHub issueTo reproduce:
- Go to demo page.
- Using developer tools, go to the
.demo-content
element and add this box shadow style:
box-shadow: 0 6px 7px -4px rgba(0, 0, 0, 0.2), 0 11px 15px 1px rgba(0, 0, 0, 0.14), 0 4px 20px 3px rgba(0, 0, 0, 0.12);
Observe the box-shadow appearance at the end of the animation:
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to animate box-shadow with silky smooth performance
Short answer: you don't. Animating a change of box-shadow will hurt performance. There's an easy way of mimicking the same effect, however, ...
Read more >Applying box shadows in React Native - LogRocket Blog
Applying box shadows in a React Native app is not always straightforward. Learn to apply box shadows across the iOS and Android platforms....
Read more >Using CSS animations - CSS: Cascading Style Sheets | MDN
Specifies the length of time in which an animation completes one cycle. ... In this third example, three animations are specified, but only...
Read more >How to Animate CSS Box Shadows and Optimize Performance
Once the tools are open, head over to the Performance tab. You can record the shadow animation; just a few seconds is enough...
Read more >Motion components | Framer for Developers
Motion components are DOM primitives optimised for 60fps animation and gestures. There's a motion component for every HTML and SVG element, for instance ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
CSS classes are added here. Docs are updated with a new prop.
I hope this is what you were going for (rather large gif):
Please note that box shadow transition should be passed through
style
object not to be overridden in the react component.CSS
JS
When you check it yourself, please close the issue.
Cheers!
~P.S. I will publish it to NPM in a few minutes.~ Done.
I guess
hooray
emoji means this is fixed 😃 closing it!