Fix major image bugs for chrome 93+

- fixed major bugs for chrome 93+ at the cost of minor issues that may appear (unsure, did not find any in testing)
- position scaled image to the left for firefox (firefox aspect-ratio still does not scale correctly)
- added `--width` and `--height` to the `Grid` for theme creators who may want to use such information easily
This commit is contained in:
brecert
2021-09-08 07:01:11 -04:00
parent 4787a2166f
commit 999fc5b639
3 changed files with 18 additions and 19 deletions

View File

@@ -41,7 +41,7 @@ export default function Attachment({ attachment, hasContent }: Props) {
[styles.margin]: hasContent,
spoiler,
})}>
<ImageFile attachment={attachment} />
<ImageFile attachment={attachment} width={metadata.width} height={metadata.height} />
{spoiler && <Spoiler set={setSpoiler} />}
</SizedGrid>
);