HackerTrans
TopNewTrendsCommentsPastAskShowJobs

kris-kay

no profile record

Submissions

Show HN: CSS generator for a high-def glass effect

glass3d.dev
420 points·by kris-kay·anno scorso·117 comments

comments

kris-kay
·anno scorso·discuss
This project isn’t meant to recreate Liquid Glass. I started working on it because I needed UI that would look good over unknown or changing backgrounds, like in a video game, over video, or in my case AR.
kris-kay
·anno scorso·discuss
True, innovation is much easier when you have full control over the hardware. My project would have taken a fifth of the time if I were only targeting Safari on Apple devices. But I trust that clever engineers and developers will keep finding ways to optimize effects for other platforms and devices.
kris-kay
·anno scorso·discuss
> I don't think this is a kind of moat they created with the explicit intention to make web apps worse.

Yes, exactly! Personally, I’m glad that Apple invests in this kind of R&D. They push the whole field forward as others try to catch up. I doubt they’ll ever make their UI freely available to all other platforms, but I do hope CSS continues to add features that make these effects much easier to implement on the web.
kris-kay
·anno scorso·discuss
> this would be a lot more useful to me on mobile if I could hide or collapse the box.

Are you referring to the code preview area?

In my first implementation, I had a small demo rectangle above the generator UI, but even a small one took up too much space and made the UI harder to use. If I let the whole page scroll, people got frustrated because it wasn’t obvious they needed to stay at the top of the scroll to see the rectangle they were editing.

Since this tool is mainly intended for coding, I’m prioritizing the desktop experience, with mobile acting more as a quick preview and proof that it works on mobile. That said, if you know of any similar UI that works really well on mobile, please share links!
kris-kay
·anno scorso·discuss
My favorite browser is Firefox, so I hope not. The examples didn't work in Safari either. Look cool in Chrome though.
kris-kay
·anno scorso·discuss
> If any aspect of Liquid Glass is successful it will be when it’s used sparingly to delight in places that are low stakes and where other affordances are present

I fully agree with you there. Though I like the Liquid Glass look overall, I think Apple is overusing it. It definitely shouldn’t be a background for paragraph-sized text (e.g., I can’t read half the text in banners on my phone).

Some context about this project:

    - I’m not trying to recreate Liquid Glass (though happy to chat about it)
    - Goal: Production-usable → must at least work on current (desktop and mobile) versions of Chrome, Safari, and Firefox, on both Apple and PC/Android devices
    - Goal: Optimize the developer experience (more relevant to the glass SCSS library I’m working on) → ideally, people can add a class (plus an optional wrapper) and it just works in most tech stacks. 
So my intended value adds are aesthetic polish and ease of use, rather than raw innovation.

Thank you for sharing potential implementation solutions. I'll research them and see if I can wrangle them to work cross-browser.
kris-kay
·anno scorso·discuss
Your project looks awesome! I'm glad not to be the only one going 5+ layers deep into the shadows. The addition of Light Rays is particularly impressive!
kris-kay
·anno scorso·discuss
I agree, even a very subtle texture makes a big difference!
kris-kay
·anno scorso·discuss
Not anymore! We live in the golden age of display: grid; + place-items: center;
kris-kay
·anno scorso·discuss
Just saw that you added this project to the spark-joy list. Thanks so much!
kris-kay
·anno scorso·discuss
All good! Thanks for looking into it.
kris-kay
·anno scorso·discuss
thank you!
kris-kay
·anno scorso·discuss
Nice! Spark Joy looks like an awesome resource.
kris-kay
·anno scorso·discuss
Yes thank you
kris-kay
·anno scorso·discuss
I mean you are right...but I still want to make the nicest thing I can make for the web.
kris-kay
·anno scorso·discuss
Thanks!
kris-kay
·anno scorso·discuss
Interesting, no there are no scroll effects anywhere on the page. Would you mind sharing what device, browser, and level of internet connection you're using?
kris-kay
·anno scorso·discuss
Thank you!
kris-kay
·anno scorso·discuss
Thanks for stating my side of this trade-off and for the nice feedback!
kris-kay
·anno scorso·discuss
True, but it wasn't meant to. I installed the 2nd beta on my phone as well and like it so far.