Summary: X-link: https://github.com/facebook/react-native/pull/46428 Pull Request resolved: https://github.com/facebook/yoga/pull/1696 We do not validate the aspect ratio to ensure it is non zero and non inf in a lot of places. Per the spec, these values should act like auto. There is no auto keyword, but it is the default so I just set the style to a default FloatOptional in this case Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D62473161 fbshipit-source-id: 6857de819538a7a87ce0a652e99f5a49992921ae
20 lines
718 B
HTML
20 lines
718 B
HTML
<!-- TODO: aspect-ratio behavior is inconsistent with Web -->
|
|
<div id="aspect_ratio_does_not_stretch_cross_axis_dim" data-disabled="true" style="width: 300px; height: 300px;">
|
|
<div style="flex: 1; overflow: scroll;">
|
|
<div style="flex-direction: row;">
|
|
<div style="flex: 2; aspect-ratio: 1;"></div>
|
|
<div style="width: 5px"></div>
|
|
<div style="flex: 1">
|
|
<div style="flex: 1; aspect-ratio: 1;">
|
|
<div style="width: 5px"></div>
|
|
<div style="flex: 1; aspect-ratio: 1;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="zero_aspect_ratio_behaves_like_auto" style="width: 300px; height: 300px;">
|
|
<div style="aspect-ratio: 0; width: 50px"></div>
|
|
</div>
|