Figma designs -> CSS code. Linear-fill background?
I'm trying to replicate this design into CSS (I started off simple, yea, I know)...
top and bottom 15% is #1A1919.. the rest is #B57D7D but it looks like it's at 50% from top to bottom, then 50% from bottom to top...? is this even possible, should make it simpler?
3 Replies
what do you mean? i don't see the need for making it simpler?
like this?
linear-gradient(0deg, black 15%, #B57D7D 50%, black 85%);
?what you have mostly looks fine to me. You can probably get rid of the
0deg,
. linear-gradients default to starting at the top and working down so there's no need to declare that. Are you asking whether there's a way to mirror the gradient? Or whether you should use a variable for the 15% at the top and bottom?