-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
When applied via *.css file z-index is working.
However when declared in *.xml file zIndex is renered by element position in the xml tree and not by its value.
Code to reproduce this issue :
<Page xmlns="http://schemas.nativescript.org/tns.xsd" >
<!-- this won't work! -->
<AbsoluteLayout>
<GridLayout zIndex="99" height="100" width="100" backgroundColor="red"></GridLayout>
<GridLayout zIndex="1" height="200" width="200" backgroundColor="green"></GridLayout>
</AbsoluteLayout>
</Page>
<Page xmlns="http://schemas.nativescript.org/tns.xsd" >
<!-- this works! -->
<AbsoluteLayout>
<GridLayout zIndex="1" height="200" width="200" backgroundColor="green"></GridLayout>
<GridLayout zIndex="99" height="100" width="100" backgroundColor="red"></GridLayout>
</AbsoluteLayout>
</Page>
// this works!
.lower-grid {
z-index: 1;
}
.upper-grid {
z-index: 99;
}