-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
[4.0.x] page transition with full screen page background images issues #16678
Comments
Has anyone else tried to implement full screen image backgrounds? |
Hi there, Also i'm using |
I found solution, just change background url to base64 instead of simple url, and image stops flashing |
Base64 vs external image file has been discussed for years. While it may work better than with external files - in your use-case - it's generally not good solution for a number of reasons, but especially when it comes to larger fullscreen background images. |
This is partially the solution (at least allowing for a full screen image to be shown): However, using |
The ideal solution would be to pass on the background-image url to the ion-content web component, NOT using a css variable, which creates performance (slow) and visual issues (flickers on iOS). |
Unfortunately it is still broken and even worse with v4.1.0. |
Hi there, I appreciate everyone's patience with this issue. We are actively looking into this issue, and will update you when we have more information. Thanks! |
Thanks @liamdebeasi for the heads up, that's great news. |
Hi @olivermuc, I am noticing the background image flickering (known issue in WebKit, more here: #17494), but other than that, the background image appears to be animating as it should. I am testing on the Thanks! |
@liamdebeasi I noticed the above reported issues on iOS (across devices, latest version). Your workaround (to bypass the known webkit bug) is a nice one, and I can easily imagine that to be my choice of implementation, until Safari is fixed. The benefit of doing it inside the controller is that one can still utilize the out of the box header/body padding logic and it doesn't require manipulating the |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[x] 4.0.x
Current behavior:
During the animation of page transitions, the full screen background is not animated, instead painted at once.
Expected behavior:
I would expect to find a way to have a full screen background animate during page transition.
Steps to reproduce:
![page-transition](https://user-images.githubusercontent.com/10549895/49795843-5540ad80-fd3b-11e8-8a84-b7dc10162238.gif)
See below sample code.
Related code:
Sample app provided:
https://github.com/olivermuc/pages-with-background-images
PageOne SCSS sample code (see also further info below):
Other information:
The above SCSS code was the last resort after having tried a myriad of ways to implement a full screen background without having to use
<ion-content fullscreen>
.NB1
Btw I did try
<ion-content fullscreen>
and the results weren't satisfying mostly bc of performance issues introduced by the use of CSS variables for dynamically changing the --background.This was the SCSS code I used for that:
The result even worse:
![page-transition2](https://user-images.githubusercontent.com/10549895/49796479-16135c00-fd3d-11e8-96e3-2764b658a7b9.gif)
NB2:
Animation is significantly better if I were to not use the background CSS var and instead provided a hardcoded
background: ...
command:Result:
![page-transition3](https://user-images.githubusercontent.com/10549895/49797021-88387080-fd3e-11e8-9634-6abf0dcfa8f8.gif)
HOWEVER, as you can see, due to CSS scope I can only apply my custom background to the parent
<ion-content>
which doesn't stretch across the entire page...a catch 22 situation.Ionic info:
The text was updated successfully, but these errors were encountered: