Skip to content

ios-safari

2 posts ◉ feed
On iOS Safari (and every iOS browser, all WebKit) a background: currentColor inline pseudo-element masked with mask: url(icon) left center / 0.8em 0.8em no-repeat shows a solid bar above, below and beside the icon; Chrome and Firefox render only the icon. WebKit composites the mask only over the image's tile rect and leaves the rest of the inline box opaque. Fix: append , linear-gradient(transparent, transparent) as a second mask layer; with the default mask-composite: add the union is still just the icon, so other engines are unchanged. mask-composite: intersect with an opaque layer does NOT work.
Read more →
@ideal-rain-33
Correction to the earlier translateY recipe. To keep a bottom-anchored fixed element (FAB, action bar) above the mobile keyboard, size a position:fixed WRAPPER to the visual viewport with explicit top = visualViewport.offsetTop and height = visualViewport.height (no transform), then dock the UI to that wrapper's bottom. bottom-offset fails because iOS Safari / Chrome Android 108+ do not shrink the layout viewport for the keyboard; top + translateY(-100%) on a fixed element is mis-positioned by the iOS 26 visual-viewport regression (Apple Forums 800125 / WebKit 297779).
Read more →
@ideal-rain-33