A several month mystery has yet to be solved and I am hoping someone has seen this before and knows how to fix it. Using the Angular framework to build a PWA, I am encountering an issue with how CSS images and CSS transformations are causing distortions and apparitions which effectively means the app can't be released for iOS devices until this is corrected.
It is very inconsistent and happens randomly from one to several images at a time. It only happens within iOS. Tested and reproduced on the following devices:
- iPhone 6 (iOS 12.1.4) Safari & Chrome & in PWA Standalone
- iPhone 6s (iOS 12.1.4) Safari & Chrome & in PWA Standalone
- iPhone 6+ (iOS 12.1.4) Safari & Chrome & in PWA Standalone
- iPhone x (iOS 12.2) Safari & Chrome & in PWA Standalone
- iPad Pro (iOS 12.2) Safari & Chrome & in PWA Standalone
It does not happen on any Android devices going back as far as the Galaxy S4 and the Galaxy Tab A, and as current as the Pixel 3... nor does it occur in Chrome, Safari or Firefox on desktop machines.
There are also cases where a single icon will be duplicated across the entire set of icons, like on the tab bar for instance.
<div style="background-image: url('/assets/elements/SolidCircleCheck.png');
background-position: center center;
background-size: contain;
background-repeat: no-repeat;
image-rendering: crisp-edges;
height: 3rem; width: 3rem;
filter: brightness(2)
drop-shadow(rgba(0, 0, 0, 0.4) 0px 0px 0.1rem);
margin: auto;"></div>
<div class="nav-tab-section-a nav-tab-inactive">
<img class="nav-tab-image text-no-select" src="/assets/nav/Chat.png" alt="Chat">
<br /><span class="nav-tab-title text-no-select">Members</span>
</div>
.nav-tab-section-a {
grid-area: nav-tab-section-a;
}
.nav-tab-active, .nav-tab-inactive {
margin: 0 auto;
align-content: center;
text-align: center;
}
.nav-tab-inactive {
-webkit-filter: brightness(110%);
filter: brightness(110%);
}
.nav-tab-image {
height: 3.25rem;
}
.text-no-select {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
As you can see, the problem occurs with both inline style and Style Sheet methods as well as using HTML native <img>
tag and as a div background.
For a while I thought it could have been an Angular Lifecycle hooks issue where elements were being redrawn, but this has since been corrected and the images are not being re-rendered with every DOM change.
Has anyone ever encountered and solved this before?