Clarify the interpretation of minimum size.

This commit is contained in:
Russell Keith-Magee 2023-12-14 12:59:03 +08:00
parent c0023dc2c5
commit 2762ffc1e0
No known key found for this signature in database
GPG key ID: 3D2DAB6A37BB5BC3
2 changed files with 6 additions and 6 deletions

View file

@ -68,15 +68,15 @@ Notes
* If an ImageView is given a style of ``flex=1``, and doesn't have an explicit size set
along its container's main axis, it will be allowed to expand and contract along that
axis.
axis, with the size determined by the flex allocation.
* If the cross axis size is unspecified, it will be determined by the image's aspect
ratio, with a minimum size in the main axis matching the size of the image in the
main axis.
* If the cross axis size is unspecified, it will be determined by applying the image's
aspect ratio to the size allocated on the main axis.
* If the cross axis has an explicit size, the image will be scaled to fill the
available space so that the entire image can be seen, while preserving its aspect
ratio. Any extra space will be distributed equally between both sides.
ratio. Any extra space on the main axis will be distributed equally between both
sides.
Reference

View file

@ -313,7 +313,7 @@ The mapping that can be used to establish the reference implementation is:
the HTML reference document. The rendering area of the browser window becomes
the view area that Pack will fill.
* Images map to ``<img>`` elements. The ``<img>`` element has an additional style of
* ImageViews map to ``<img>`` elements. The ``<img>`` element has an additional style of
``object-fit: contain`` unless *both* ``height`` and ``width`` are defined.
* All other elements in the DOM tree are mapped to ``<div>`` elements.