Merge pull request #32 from dergigi/full-width-image-going-over

fix: correct fullWidthImages setting to use width instead of max-width
This commit is contained in:
Gigi
2025-11-01 00:34:32 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -71,8 +71,8 @@ export function useSettings({ relayPool, eventStore, pubkey, accountManager }: U
// Set paragraph alignment
root.setProperty('--paragraph-alignment', settings.paragraphAlignment || 'justify')
// Set image max-width based on full-width setting
root.setProperty('--image-max-width', settings.fullWidthImages ? 'none' : '100%')
// Set image width based on full-width setting
root.setProperty('--image-width', settings.fullWidthImages ? '100%' : 'auto')
}

View File

@@ -57,10 +57,10 @@
.reader .reader-markdown h1, .reader .reader-markdown h2, .reader .reader-markdown h3, .reader .reader-markdown h4, .reader .reader-markdown h5, .reader .reader-markdown h6 { text-align: left !important; }
/* Tame images from external content */
.reader .reader-html img, .reader .reader-markdown img {
max-width: var(--image-max-width, 100%);
width: var(--image-width, auto);
max-width: 100%;
max-height: 70vh;
height: auto;
width: auto;
display: block;
margin: 0.75rem auto;
border-radius: 6px;
@@ -192,8 +192,8 @@
}
.reader-markdown img, .reader-html img {
width: var(--image-width, auto) !important;
max-width: 100% !important;
width: auto !important;
height: auto;
}
}