framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Blurred (Frosted glass) effect on navbar/toolbar

Open nolimits4web opened this issue 12 years ago • 14 comments

This is a killer feature of iOS 7 ui, so we definitely need it:) Any thoughts on how realize it, perfectly with CSS only.

I discovered pure CSS solution using CSS regions, it works perfect on desktop Safari, but super slow and buggy on iOS, so we need something different.

It is also possible do it with JS by duplicating content, but it is not an option because we will have a lot problems when we need to update content there (in duplicated layers)

nolimits4web avatar Mar 24 '14 18:03 nolimits4web

Can you provide an example screenshot of what you're looking for?

ptb avatar Mar 24 '14 19:03 ptb

I'm assuming you're looking for something like -webkit-filter: blur(2px); but I'm not sure. It would have to blur a separate background element and not any of the text elements. ;)

ptb avatar Mar 24 '14 19:03 ptb

Here it is http://jsfiddle.net/3SyzN/11/ Open in desktop Safari

nolimits4web avatar Mar 24 '14 19:03 nolimits4web

As you may see it looks pretty cool:) The same "frosted" bars are used everywhere on iOS. The problem in fiddle is that scrolling doesn't work on iOS. And if i add -webkit-overflow-scrolling to .page-blur-content then everything just disappear on mobile Safari))

nolimits4web avatar Mar 24 '14 19:03 nolimits4web

Using CSS filter causes a lot of performance issues.

thilak-rao avatar Apr 04 '14 06:04 thilak-rao

SVG filters might be a solution.

http://viget.com/inspire/frosted-glass-effect-with-blur-filters-and-masks

vscholz avatar Apr 27 '14 01:04 vscholz

Closing for now as there is no good way to realize it at the moment

nolimits4web avatar May 22 '14 20:05 nolimits4web

I just randomly stumbled on this article. I didn’t read much of it, but one thing caught my attention: the guy uses OpenGL to do blur.

iOS 8 brings WebGL to Safari and web views.

I don’t know much about WebGL, I guess to achieve a live blur effect on HTML elements it would need to take a “screenshot” of the part to blur and update it live (including, most importantly, when scrolling). Sounds like two impossible things, but maybe you’re determined enough to tinker with this. :)

dieulot avatar Aug 11 '14 16:08 dieulot

Nice article, but you are right, it sounds like two impossible things :) But will see, i still hope that they stabilise css regions API in iOS 8, and it would be possible without a hassle

nolimits4web avatar Aug 11 '14 16:08 nolimits4web

Now 2016. Still no chance?

mkrikson avatar Aug 15 '16 22:08 mkrikson

backdrop-filter: blur(10px); should do on iOS devices (no support in Chrome or Firefox)

ZanderBrown avatar Aug 15 '16 22:08 ZanderBrown

Yeah only supported by safari and iOS safari: http://caniuse.com/css-backdrop-filter

But this enough for iOS theme

mkrikson avatar Aug 16 '16 10:08 mkrikson

+1 for Frosted glass

Dielz98 avatar Aug 17 '16 14:08 Dielz98

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jun 25 '18 17:06 lock[bot]