[CSS3] Use CSS Variables to Maintain the Aspect Ratio for an Element
section img { --aspect-ratio: calc( 4 / 3); --height: 30vmin; --width: calc(var(--height) * var(--aspect-ratio)); height: var(--height); width: var(--width); }
section img { --aspect-ratio: calc( 4 / 3); --height: 30vmin; --width: calc(var(--height) * var(--aspect-ratio)); height: var(--height); width: var(--width); }