Next Future Image Rounded?

Using next/future/image with tailwindcss and can't get an image to round
<div className="flex items-stretch justify-center">
<div className="not-prose relative flex-1">
<Image src={guild.icon!} alt="" className="rounded-full object-contain" fill />
</div>
<h1 className="flex-[2]">{guild.name}</h1>
</div>
<div className="flex items-stretch justify-center">
<div className="not-prose relative flex-1">
<Image src={guild.icon!} alt="" className="rounded-full object-contain" fill />
</div>
<h1 className="flex-[2]">{guild.name}</h1>
</div>
10 Replies
ryanagillie
ryanagillieOP3y ago
even if I add not-prose to that outside div (which removes tailwindcss/typography) it still doesn't make it round Tried styling it directly with style={{ borderRadius: '9999px' }} to no avail
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ryanagillie
ryanagillieOP3y ago
Nothin
ryanagillie
ryanagillieOP3y ago
ryanagillie
ryanagillieOP3y ago
using a regular <img> tag works, which makes me think it's the next/future/image fault ahhhhh it has to do with the object-contain trying to figure out a fix
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ryanagillie
ryanagillieOP3y ago
Does not work either, found out it's actually impossible. You have to use max-width/height instead of height/width, but next doesn't allow you to override height/width
ryanagillie
ryanagillieOP3y ago
Stack Overflow
How can I use "object-fit: contain" in CSS and still have a border ...
I'm trying to show an image in a "lightbox" style so that it will fill the available area on screen, in this case 90% of the width of the page and 70% of the height. Using object-fit: con...
ryanagillie
ryanagillieOP3y ago
It may be possible with another layout, but the one I have currently doesn't work. Trying to get icon {name}
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server