Backdrop-filter doesn`t work

I am trying to build a login/register UI and i want to use the backdrop-filter to blur some background ( just expirementing). Here is the code in code pen https://codepen.io/nikas19/pen/wvVojor. The backdrop-filter doesn`t work.
74 Replies
ἔρως
ἔρως2w ago
seems to be working to me
No description
Sleep Twitch
Sleep Twitch2w ago
The problem is your background is just 1 solid color, so the blurred version of that looks exactly the same as the non blurred version. Another problem is that this: background: linear-gradient(rgba(255, 255, 255, 0.1)); isn't a valid background I think. You have a gradient with just 1 color?
Καλημερας
So i have to provide an rgba value instead of a solid color? does it work without any changes? i saw it from a youtube tutorial, and it worked just fine. I dont know
ἔρως
ἔρως2w ago
if that is the expected result, yes. i didnt change anything.
clevermissfox
clevermissfox2w ago
You can indeed have one colour stop if it has transparency like this or if you use the 0s after but you need both “0”s
linear-gradient( rgba(255 255 255) 0 0) );
linear-gradient( rgba(255 255 255) 0 0) );
If you’re in safari , switch the order in the css so that the prefixed backdrop filter comes after background and before non-prefixed backdrop filter
background: linear-gradient( rgba(255, 255, 255, 0.1));
-webKit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
background: linear-gradient( rgba(255, 255, 255, 0.1));
-webKit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
ἔρως
ἔρως2w ago
this last part should be handled by an auto-prefixer
Καλημερας
I want to have the glass effect. tried this , didnt do anything Maybe a problem of CSS version? i dont know.
ἔρως
ἔρως2w ago
what exactly isn't working? can you show it?
Καλημερας
thats the result
ἔρως
ἔρως2w ago
ok, so? you can't blur a flat color
Καλημερας
i want the container that wraps the form to be blured
ἔρως
ἔρως2w ago
set a background color of rgba(255, 255, 255, 0.3)
Καλημερας
The background color you see is from the container behind
ἔρως
ἔρως2w ago
my answer stands
Καλημερας
ook
ἔρως
ἔρως2w ago
try it
Καλημερας
thats the result with your rgba
ἔρως
ἔρως2w ago
then set a background color on the body
Καλημερας
But if i want the background color of body to be white? Whats the point to change the body
ἔρως
ἔρως2w ago
then set a background color on the parent of the element
Καλημερας
I just did that you can check it in my code pen Is a big container ( the purple one) and inside i have 2 containers (as displayed by the borders ) which i want to be blured
ἔρως
ἔρως2w ago
you're right, you did and the background color still doesn't work because it's a flat color
Καλημερας
thats the background color of the parent
ἔρως
ἔρως2w ago
yes, it's a flat color
Καλημερας
oh really? To be honest , what is a flat color? i dont know
ἔρως
ἔρως2w ago
it's the same color everywhere
Καλημερας
So if i want the background to be this color but apply the blur to the child container , what should i do?
ἔρως
ἔρως2w ago
you literally can't you have to have a gradient or something else you can't blur a flat color try adding background-image: url(https://placedog.net/500/280); to .user__container you will see it blurs
Καλημερας
yeah it is~ !
ἔρως
ἔρως2w ago
you will have to use a gradient or an image
Καλημερας
tried this
No description
Καλημερας
but still dont apply blur
Καλημερας
(btw it looks pretty cool hahah)
No description
ἔρως
ἔρως2w ago
which element do you want to blur?
Καλημερας
the container which has borders the child of the parent
ἔρως
ἔρως2w ago
you have 2 children from 2 parents that have borders register__area <-- these?
Καλημερας
I have the parent which is the whole colored thing yes
ἔρως
ἔρως2w ago
add background-color: rgba(255, 255, 255, 0.2);
ἔρως
ἔρως2w ago
it looks like this
No description
ἔρως
ἔρως2w ago
you need to have a background to be able to blur it
ἔρως
ἔρως2w ago
it's blurring, but very subtle
Καλημερας
no its not
ἔρως
ἔρως2w ago
yes it is check very carefully
Καλημερας
i removed the blur line and nothing changed
ἔρως
ἔρως2w ago
the gradient is less defined
Καλημερας
even added some pixels to the blur and also nothing changed
ἔρως
ἔρως2w ago
instead of being lighter add more stops to the gradient
Καλημερας
what`s the point, yes we can achieve something like blur trying different things, but i want the backdrop-filter to be applied
ἔρως
ἔρως2w ago
i did what im telling you and it works
Καλημερας
what?
ἔρως
ἔρως2w ago
this here i did it by adding a background color, and adding a non-uniform background to the parent
Καλημερας
right now i have a gradient to the parent
ἔρως
ἔρως2w ago
and im saying to add more stops, and you will see it is working
Καλημερας
Can you please tell me what are stops?
ἔρως
ἔρως2w ago
more colors in the gradient as many as you can
Καλημερας
can you send me what you did is it a good practice ?
ἔρως
ἔρως2w ago
it's exactly what a gradient is supposed to do you can add 50 if you want
Sleep Twitch
Sleep Twitch2w ago
That's what I was trying to say.. you have 1 solid color, that's the problem. A blur of a solid color looks exactly the same as the solid color, if the area you try to blur is inside that solid color. You will only see blur on the edges.
ἔρως
ἔρως2w ago
and even on the edges is very generous
Καλημερας
I changed it to a gradient , but the blur still does not apply
Sleep Twitch
Sleep Twitch2w ago
Can you show that example?
Καλημερας
user__container
user__container
is the parent with the gradient,
register__area
register__area
is the child which i want to be blured right now i have selected a color with low opacity, so it looks like its blured but it isn`t If you play around with the
backdrop-filter
backdrop-filter
you ll see nothing is changing.
ἔρως
ἔρως2w ago
No description
ἔρως
ἔρως2w ago
the blur is working the gradient is too uniform as i said, add more colors to see the effect
Καλημερας
Can you send me the css code of the gradient to copy-paste?
ἔρως
ἔρως2w ago
there are million of gradient generators online just try one
Want results from more Discord servers?
Add your server