Closed John0King closed 2 years ago
html has an official size 'vh' and 'vw', maybe xamarin.forms should support those two unit
Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes.
If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks!
Summary
When build a mobile page or mobile app using html, normally we use rem , and in
Wechat miniprogram
use rpx for exampleusing rem :
we create a simple script to calculate the root element's fontsize (window size X, and rem size 1000) , X / 1000 = rem unit base size , for example , the widow width is 2000, then 1rem = 2px and for div width: 1000 rem = 100% , 900rem = 90%.
using rpx on wechat miniprogram:
wechat team define 1rpx = X / 750, so 750rpx = 100%
by using those we can create full scalable view (scale all the div, image, text ect. ), today xamarin using Grid , StackLayout can only scale the 'box' element , but not the font
Intended Use Case
it will look the same on every device, every dpi.