Igor Marcossi

January 17, 2022

Glass everywhere

šŸ‘‹ Hey everyone

Yesterday me and my wife designed a site for her company.

We wanted to follow the glassmorphism trend because itā€™s pretty fucking beautiful, I mean, look at this:

CleanShot 2022-01-17 at 13.00.45@2x.png


That blurred sidebar look so slick! And Apple isnā€™t the only one using this trend, if you just search for the term in Dribbble or Google, youā€™ll see how freaking satisfying is to look at those glassy panels.

But what makes a glass panel look so good? Because if we just draw a shape and blur the background itā€™s not gonna look good, look:

CleanShot 2022-01-17 at 13.09.48@2x.png


See? It doesnā€™t even look like glass. The reason is that thereā€™s a few parts missing for this small little card to look good and glass-like. The first one is having something to blur. A solid color will never look good blurred, because when you blur a solid color, nothing happens.

Letā€™s put a nice image behind it to see how it looks:

CleanShot 2022-01-17 at 13.19.51@2x.png


It already looks waaaaay better. The blur radius is set to 40px. Yeah I added a star icon and tweaked the typography, but the glass effect itself already looks kinda good, but itā€™s not done yet, still doesnā€™t look real enough. If you take a closer look at Appleā€™s example above, youā€™ll notice thereā€™s a little border around the glass. Thereā€™s actually 2 borders, a black low opacity border outside and a gradient border inside going from white to transparent, diagonally. Thatā€™s because glasses reflect light differently in the borders.

Letā€™s add those:

CleanShot 2022-01-17 at 13.24.08@2x.png


Hmmm, tasty. I added a 10% opacity black border outside and, inside, a gradient border with opacity set in 30% going from white (100% opacity in the color, not in the whole border) and 50% white in the other edge:

CleanShot 2022-01-17 at 13.25.32@2x.png


But itā€™s not done yet, thereā€™s one last step missing: THE MIGHTY SHADOW. You just need to add a drop shadow in the glass to make it look like itā€™s raised, above the background. But you have to make sure the shadow doesnā€™t go behind the glass itself. Figma has a checkbox for this. Hereā€™s my drop shadow panel:

CleanShot 2022-01-17 at 13.29.06@2x.png


Make sure to uncheck that ā€œShow behind transparent areasā€. And hereā€™s the final result:

CleanShot 2022-01-17 at 13.31.08@2x.png


It looks AWESOOOOOOOOME. Oh, I increased the black border opacity to 20% (cause it disappeared after adding the shadow) and also increased the background blur radius to 60px.

Thatā€™s it, this is how you make a good looking glass panel, but I have one last tip: smooth shadows.

You may be wondering what the hell is that, since the drop shadow effect is already smooth. Well, what if I say thereā€™s another way to create shadows that looks way different?

Take a look:

CleanShot 2022-01-17 at 13.36.25@2x.png


Itā€™s subtle, but noticeable. It's a different style, but it sure look good as well. This is not something we usually do by hand, thereā€™s plenty of smooth shadow generators out there, but Iā€™ll mention two of them:

šŸ’« A Figma plugin
šŸŒŽ A CSS generator

It basically adds multiple shadows to create something more realistic.

If you wanna see the difference, hereā€™s a side-by-side:

CleanShot 2022-01-17 at 13.39.28@2x.png


In my wifeā€™s companyā€™s site, we wanted it to look like something old, so we combined a bunch of shit. We created some black/white gradients for the background, created a abstract shape behind the main stuff, added grain to the whole thing, used glass panels (with smooth shadow) in the inputs and blurred everything just a little bit (the fonts included), so you feel youā€™re inside an old movie. Hereā€™s the result:

CleanShot 2022-01-17 at 13.44.57@2x.png


To be honest, I love it. Itā€™s pretty different and really weird, but I love how weird and interesting it is.

The font I used in all images is Inter, an open source font. You can find it in Google Fonts or in Github. It's gorgeous.

Thatā€™s it, thanks for reading!

There won't be any wallpapers today since this newsletter got long enough lol

About Igor Marcossi

Developer, designer and annoying šŸ•

Get to know me more here.