ShoyuVanilla / FoundryVTT-Chat-Portrait

Other
14 stars 24 forks source link

Chat Portrait breaking item view from Savage Worlds (SWADE) #91

Closed lipefl closed 2 years ago

lipefl commented 2 years ago

When using Chat Portrait, the item names are hidden, it seems that the html is being changed and another style from swade system css is being applied. I solved for my table with this rule (using Custom CSS module), but i'm not sure it's the best fix.

.chat-portrait-text-size-name { height: 36px !important; display: flex; }

with Chat Portrait image

without Chat Portrait image

p4535992 commented 2 years ago

There is a module setting for this "CUSTOMIZE YOUR OWN TEXT WITH CSS " try out

lipefl commented 2 years ago

@p4535992 Nice. I'm already using Custom CSS for other purposes, so no problem for me. I just though that it could be a fix to all savage worlds players (especially those without knowledge of css), since it's a conflict between the system and Chat Portrait.

p4535992 commented 2 years ago

Yea sadly i will lose my mind for take in account every system, so i just add a module setting for customize the text system by system

lipefl commented 2 years ago

@p4535992 I understand. If you can add this rule to css, it'll fix for everyone. There's a swade class (.swade), so i dont think it'll be a problem for other systems.

.message-content .swade.chat-card .card-header h3.chat-portrait-text-size-name { height: 36px; display: flex; }

Dorako commented 2 years ago

An IMO superior solution which I can't use via CSS is for the h3 to not contain the image. By having the h3 next to the image, you can align the text and image separately. I've worked around this issue with code similar to lipefl, but it doesn't look as nice as what I had before Chat Portraits modified the html.

p4535992 commented 2 years ago

as a notification i'm working on a possible solution, here a new setting for the next release:

Setup the custom styling for the current system: Setup additional custom styling on message with CSS language based on the feedback of the community, Is a community effort for anyone don't know css language (note override any other prior property). If the settings 'Setup additional custom styling on the text chat message' or 'Setup additional custom styling on the image prepend the text chat message' is used (no blank text) this option even if true is ignored for the html elements involved. By default is true.

Here the table apllied for the supported system :

System id Css for text message Css for the image prepend the text
swade height: auto; display:flex; height: auto; display:flex;
pf2e display:block; display:block;
dnd5e display:flex; display:flex;

so i will on request prepare a initial system css style.