feat: Support animation style prop from IonContent
See original GitHub issueFeature Request
Ionic version:
[x] 4.x
Describe the Feature Request Please support animation for IonContent element.
Describe Preferred Solution Include new prop to support animation style.
Describe Alternatives Adding the value via TS, but it’s not working. e.g:
const contentElement = (this.content['el'] as HTMLElement);
const innerScroll = contentElement.shadowRoot.querySelector('.inner-scroll') as HTMLElement;
innerScroll.style.animation = 'background 30s ease infinite';
Related Code
ion-content {
--background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
--animation: background 30s ease infinite;
}
@keyframes background {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Support animation style prop from IonContent · Issue #19957 ...
Describe Preferred Solution Include new prop to support animation style. ... feat: Support animation style prop from IonContent #19957.
Read more >Animations - Ionic Framework
Ionic apps use Web Animations API to build and run animations. Learn how this utility lets developers build complex animations in a platform...
Read more >An Introduction To React With Ionic - Smashing Magazine
You are going to create a reusable React component in this step. This component will receive data and display information about a comic....
Read more >ionic/docs/core.json - UNPKG
79, "docs": "Animation to use when the action sheet is presented.", ... IonButton, IonContent } from '@ionic/react';\n\nexport const ...
Read more >Implementing HTML5 canvas in Ionic - Mastering Ionic
From drawing geometric shapes and manipulating image pixel data to creating advanced animations the HTML5 Canvas API opens up a world of ...
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
this work for me, put this in your page component
then in your page.sccs add this for example
and the same for the rest of properties that you need
Thanks for the issue. I am going to close this as we are going to be rolling out a broader animation solution in the next major release of Ionic Framework that should account for this use case. Thanks!