make image aspect ratio a fraction

This commit is contained in:
keyan 2024-03-06 15:15:11 -06:00
parent 575a820a7a
commit b38a5e653c
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ function ImageProxy ({ src, srcSet: { dimensions, ...srcSetObj } = {}, onClick,
const Image = memo(({ className, src, srcSet, sizes, width, height, bestResSrc, onClick, onError }) => { const Image = memo(({ className, src, srcSet, sizes, width, height, bestResSrc, onClick, onError }) => {
const style = width && height const style = width && height
? { '--height': `${height}px`, '--width': `${width}px`, '--aspect-ratio': `${width / height}` } ? { '--height': `${height}px`, '--width': `${width}px`, '--aspect-ratio': `${width} / ${height}` }
: undefined : undefined
return ( return (