Logged from @tim (admin ticket)
I can't seem to get a background image to appear on a label at all. I am developing using Platform in-browser client and livesyncing to Android and iOS devices. I'd really appreciate your help here. We're close to deploying our app. I want to be able to get this working.
Issue - can't load image via CSS background-image on Label
page.css
.imageBackground {
background-image: url('~/images/icon.png');
background-repeat: no-repeat;
background-position: left;
background-size: contain;
}
page.xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo">
<StackLayout>
<Label text="label" class="imageBackground" textWrap="true"/> <!-- NOT Working -->
<Button text="button" class="imageBackground" textWrap="true"/> <!-- Works (suggested workaround) -->
</StackLayout>
</Page>
Code to reproduce this issue: https://github.com/NickIliev/ticket-1047813
Reactions are currently unavailable
Logged from @tim (admin ticket)
Issue - can't load image via CSS background-image on Label
page.css
.imageBackground { background-image: url('~/images/icon.png'); background-repeat: no-repeat; background-position: left; background-size: contain; }page.xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"> <StackLayout> <Label text="label" class="imageBackground" textWrap="true"/> <!-- NOT Working --> <Button text="button" class="imageBackground" textWrap="true"/> <!-- Works (suggested workaround) --> </StackLayout> </Page>Code to reproduce this issue: https://github.com/NickIliev/ticket-1047813