<ion-list>
<ion-item text-wrap no-lines class="choice" text-center >
some text
</ion-item>
</ion-list>
.choice {
background-color: #564e68 !important;
font-size: 2.0em;
color: white;
}
It works perfectly on ios.
If I remove text-wrap. font-size will work on android. Any idea?
Does the issue appear in the browser when running $ ionic serve?
If so, then you can inspect the cascade to see if something is overriding your font-size value.
Thanks Chris for your help. I think it’s Android specific. After adding this to my css, it started working:
[text-wrap] .label-md {
font-size: 2.5rem;
}
Is this the right way ?
Yeah. I would suspect that maybe to ensure platform continuity, it needed to set the font size.
1 Like