Files
yoga/gentest/fixtures/YGAbsolutePositionTest.html
Lukas Wöhrl e9927377b5 Fix position on root node with RTL direction
Summary:
If the root node has a position and we have a RTL layout, that position must be like LTR direction. See #477.
Closes https://github.com/facebook/yoga/pull/502

Differential Revision: D4867144

Pulled By: emilsjolander

fbshipit-source-id: b5ad3d87e7054090da12d7665a3d1abe8496a548
2017-04-11 13:11:05 -07:00

66 lines
3.6 KiB
HTML

<div id="absolute_layout_width_height_start_top" style="width: 100px; height: 100px;">
<div style="width:10px; height: 10px; position: absolute; start: 10px; top: 10px;"></div>
</div>
<div id="absolute_layout_width_height_end_bottom" style="width: 100px; height: 100px;">
<div style="width:10px; height: 10px; position: absolute; end: 10px; bottom: 10px;"></div>
</div>
<div id="absolute_layout_start_top_end_bottom" style="width: 100px; height: 100px;">
<div style="position: absolute; start: 10px; top: 10px; end: 10px; bottom: 10px;"></div>
</div>
<div id="absolute_layout_width_height_start_top_end_bottom" style="width: 100px; height: 100px;">
<div style="width:10px; height: 10px; position: absolute; start: 10px; top: 10px; end: 10px; bottom: 10px;"></div>
</div>
<div id="do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent" style="height: 50px; width: 50px; overflow: hidden; flex-direction: row;">
<div style="position: absolute; start: 0px; top: 0px;">
<div style="width: 100px; height: 100px;"></div>
</div>
</div>
<div id="absolute_layout_within_border" style="height:100px; width:100px; border-width: 10px; margin: 10px; padding: 10px;">
<div style="position: absolute; width: 50px; height: 50px; left: 0px; top: 0px;"></div>
<div style="position: absolute; width: 50px; height: 50px; right: 0px; bottom: 0px;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_center" style="height: 100px; width: 110px; flex-grow: 1; align-items: center; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_flex_end" style="height: 100px; width: 110px; flex-grow: 1; align-items: flex-end; justify-content: flex-end;">
<div style="position: absolute; width: 60px; height: 40px;"></div>
</div>
<div id="absolute_layout_justify_content_center" style="height: 100px; width: 110px; flex-grow: 1; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;"></div>
</div>
<div id="absolute_layout_align_items_center" style="height: 100px; width: 110px; flex-grow: 1; align-items: center;">
<div style="position: absolute; width: 60px; height: 40px;"></div>
</div>
<div id="absolute_layout_align_items_center_on_child_only" style="height: 100px; width: 110px; flex-grow: 1;">
<div style="position: absolute; width: 60px; height: 40px;align-self: center;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_center_and_top_position" style="height: 100px; width: 110px; flex-grow: 1; align-items: center; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;top:10px;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_center_and_bottom_position" style="height: 100px; width: 110px; flex-grow: 1; align-items: center; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;bottom:10px;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_center_and_left_position" style="height: 100px; width: 110px; flex-grow: 1; align-items: center; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;left:5px;"></div>
</div>
<div id="absolute_layout_align_items_and_justify_content_center_and_right_position" style="height: 100px; width: 110px; flex-grow: 1; align-items: center; justify-content: center;">
<div style="position: absolute; width: 60px; height: 40px;right:5px;"></div>
</div>
<div id="position_root_with_rtl_should_position_withoutdirection" style="height: 52px; width: 52px; left: 72px; ">
</div>