Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Using 400x300 in the aspectratio, it's implying size in px. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This attribute applies on all image element types (including SVG images) and vid
## Alternatives Considered

### aspectratio attribute
`<img aspectratio="400x300" style="width: 100%">`
`<img aspectratio="4x3" style="width: 100%">`

* **Pro**: Simple to understand and implement
* **Con**: Doesn't work for a common use case, where you want to constrain an image to be no bigger than its container, but not stretch it to be larger. That is, you want to set the image's width to min(width of container, intrinsic width of image), and you want to do so before downloading any image data.
Expand Down