Eric_WVGG 4 days ago

I was grappling with background-attachment: fixed in iOS devices just last week… caniuse.net indicated that it’s supported now, but that is very much still not the case.

I think I’ve finally cracked why it’s not supported. The official line is that it’s “too expensive” on the cpu, but that doesn’t hold water when single-core performance of iPhones regularly outpaces Macs.

iOS Safari does one extra “abstraction” phase of an entire web page that allows for instant pinching and zooming of web pages. In order to get background-attachment: fixed working under such a paradigm, you would need to not only calculate where the background image is relative to the viewport, but also the size and placement of a zoomed document in real time. And on top of that, the browser designers would need to make some kind of decision on what a coherent implementation of the feature would even do under such circumstances.

I wish that iOS had a way to just turn off this extra abstraction in CSS altogether. It was a fine crib before responsive design was a thing, but for some pages, it just causes problems now. It’s not needed “everywhere” on the web any more than it’s necessary in all iOS apps.

3
vundercind 3 days ago

I use pinch-zoom all the time I the time, even on mobile-targeted pages. I’d be irritated with Apple if they let web developers disable that basic feature of my browser.

leptons 4 days ago

Too bad you're still forced to use Safari on iOS (in the US) even if you install Chrome or Firefox.

Eric_WVGG 3 days ago

I wouldn't trust Chrome to treat my iPhone battery well, unfortunately. Looking forward to hearing reviews of real Firefox on iOS from Eurozone, though… I'd consider downloading the source and compiling with a dev cert if it turns out to be any good.

leptons 3 days ago

I wouldn't worry about a couple % of battery life through the course of the day. For me, it wouldn't be worth using a hobbled web browser.

tyleo 3 days ago

Yeah, the abstraction already breaks other common HTML techniques anyways like floating navigation bars.