S
Solara•5mo ago
izumi.qu

Avatar edge contains color

I've create avatar with square image as child, but there is still some background color on left and top
No description
6 Replies
MaartenBreddels
MaartenBreddels•5mo ago
Hi, can you share the code?
izumi.qu
izumi.qu•5mo ago
with solara.v.Avatar(color='#ff991f',size=400): solara.Image('Izumi.png')# any square image
iisakkirotko
iisakkirotko•5mo ago
This happens because the solara.Image element has margin: 2px; by default. (it inherits this from the .jupyter-widget CSS class). You can fix this by using solara.HTML instead, like so:
with solara.v.Avatar(color='#ff991f', size=400):
solara.HTML(tag="img", attributes={"src": 'https://picsum.photos/400', "width": "100%"})
with solara.v.Avatar(color='#ff991f', size=400):
solara.HTML(tag="img", attributes={"src": 'https://picsum.photos/400', "width": "100%"})
See a live example here I think there needs to be some discussion about what approach (if any) we would take towards a more permanent solution. @izumi.qu do you want to open an issue for this on github?
PyCafe - Solara - Visual Avatar Generator with Solara
PyCafe: get your daily fix of Python!
izumi.qu
izumi.qu•5mo ago
yes, I'd like to. This is the first time I've invited to open an issue, what is the different for me and not the developer to open an issue? BTW,is the question of chatbox doesn't refresh fixed?
iisakkirotko
iisakkirotko•5mo ago
@izumi.qu If you open the issue the main benefit for you is that you get notifications on our progress towards fixing it. I haven't had a chance to look more into the chatbox issue yet. I'll try to get around to it next week.
izumi.qu
izumi.qu•5mo ago
🫡
Want results from more Discord servers?
Add your server