The div I need to develop is this:
The code I wrote for that is:
<div
className='[background-image:linear-gradient(to_bottom,#212639_100%,#062142_25%),linear-gradient(to_bottom,#ffffff_24%,#ffffff_0%)]
flex justify-center items-center rounded-[16px] max-w-16 max-h-16 min-w-16 min-h-16 bg-gray-700 shadow-card-a'
>
<Image src={DeltaTestLogoIcon} alt='logo of delta test icon' />
</div>
This was inspired from exmaxx’s comment here at: How to use tailwind gradient utilities with multiple gradients?
I am following the exact same specifications as in Figma but am unable to replicate the same design. Can anyone please help?
2
Answers
There’s some grammar fault in your code, and I think black layer needs add some transparency, to show white layer.
Try
[background-image:linear-gradient(to_bottom,_#062142aa_25%,_#212639aa_100%),_linear-gradient(to_bottom,_#ffffff_0%,_#ffffff_24%,_#212639_100%)]
Here’s the effect drawing
Several things:
bg-[]
arbitrary value class instead of a full arbitrary property class.Here it is with all those points fixed: