WordPress / twentyseventeen

Twenty Seventeen is a theme now included in all WordPress installs. To report any issues please go here: https://core.trac.wordpress.org/newticket
180 stars 125 forks source link

Turning off 'background-attachment: fixed' for iOS #465

Closed laurelfulford closed 7 years ago

laurelfulford commented 7 years ago

Turning off the background-attachment: fixed style for iOS devices; it's not supported, and causes the images to be blown up to really huge, blurry sizes.

I steered away from sized-based @media queries, since iPad Pros are so large and it would cause the effect to be 'turned off' on laptop-sized screens, too.

However, what I ended up with feels hacky to me - I'd be interested in suggestions others have for this.

See #450.

josephfusco commented 7 years ago

IMO I think we should go with a JS check rather than this wizardry.

josephfusco commented 7 years ago

@laurelfulford I've been meaning to refactor the custom header image but haven't found time to yet.

The idea is using a position: fixed psuedo element without the fixed background attachment. This would also improve scrolling performance and in theory also fix #450.

laurelfulford commented 7 years ago

I think we should go with a JS check rather than this wizardry.

Thanks @josephfusco! I wasn't sure if that would be overkill, but it's probably easier to understand than this crazy CSS 🙂

The idea is using a position: fixed psuedo element without the fixed background attachment.

My only worry with this is that all the images on the front page use this, not just the custom header image. It sounds like this would work for the custom header space, but I'm not sure it's actually possible for anything further down the page.

davidakennedy commented 7 years ago

@laurelfulford will take another stab at this after merge to Core.