I am requesting to add the support for max-width and max-height features, this will help alot of UI/UX designers, every other problem I manged to work around it with plug-ins except for this...
Thank you
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
This is a must. We currently have to do some crazy hacks to achieve something similar to max-width.
For example, we created https://github.com/MukaSchultze/nativescript-windowed-modal just because we wanted a consistent android/iOS experience and the ModalStack was specifically created so we could have our own margins and a max-width (we set the width+margins so it ends up fitting the device).
Same issue with our login box, in which I had to set a fixed width + margins instead of using something like width:80%; max-width: 500
We also have some platform specific code to put a LottieView in the actionbar, since Android/iOS have different heights and fixing the rate at 100% basically screwed with our aspect ratio.
We also need this extensively in our company. For instance we want to centralize the content of our modals vertically and we use gridlayout with rows="* auto *" and use a scrollview for the middle one so that in small devices it won't overflow and it would be scrollable. but without specifying max-height=100% for the scrollview what happens is that the scrollview just overflows the viewport. There are a ton of other usecases to this. We strongly believe this is a must.
Is there any progress on this? If not, has anyone found a workaround, which is not JavaScript? 😄
+1
One more reason to adopt Facebook’s Yoga library for flexbox layout – it would give us all CSS layout features, including max-width and max-height, not to mention absolute and relative positioning. But it’s easy to dream!
@shirakaba agree though it would only work for this layout. You can want that with label, images....
BTW in a sense I think the code is already there as it is the AT_MOST
Most helpful comment
This is a must. We currently have to do some crazy hacks to achieve something similar to max-width.
For example, we created https://github.com/MukaSchultze/nativescript-windowed-modal just because we wanted a consistent android/iOS experience and the ModalStack was specifically created so we could have our own margins and a max-width (we set the width+margins so it ends up fitting the device).
Same issue with our login box, in which I had to set a fixed width + margins instead of using something like
width:80%; max-width: 500
We also have some platform specific code to put a LottieView in the actionbar, since Android/iOS have different heights and fixing the rate at 100% basically screwed with our aspect ratio.