haxeui-core
haxeui-core copied to clipboard
Incorrect Assignment of `.first` and `.last` CSS Classes When Child Elements Are Explicitly Hidden in XML
Сhild elements of a container are assigned the .first
and .last
CSS classes incorrectly if one of the children is explicitly hidden in the XML template. This causes improper styling for visible elements.
<vbox style="padding: 5px;">
<label styleName="itemContainer" />
<label styleName="itemContainer" hidden="true" />
<label styleName="itemContainer" />
<label styleName="itemContainer" />
<label styleName="itemContainer" />
</vbox>
Expected Behavior
Item 1 should be assigned .first
.
Item 5 should be assigned .last
.
Current Behavior
Item 1 is assigned .first
.
Item 3 is correctly treated as a middle element (no specific classes assigned)
Item 4 is incorrectly assigned .last
.
Item 5 is incorrectly treated as a middle element (no specific classes assigned)
Test app / minimal test case
https://haxeui.org/builder/?38da68ef
Your Environment
- Official playground as well as version
1.7
fromhaxelib