Replies: 1 comment
-
|
Thanks for the detailed write-up and the examples. We definitely don't want to add built-in platform + version selectors like That said, being able to define your own selectors sounds like a fun idea. I can see how something like custom runtime selectors for device type, OS version, tablet layout, or app-specific checks could be useful. No promises for now, but maybe it's something we can explore in the future. For now, I think the best approach is to keep using your own helpers together with a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR: It would be awesome to be able to define custom platform selectors e.g.
ios18:p-2ortablet:p-8and such.Apologies if this has already been discussed, I didn't manage to find any issues or PRs around it at least.
Uniwind currently supports some nice platform selectors (https://docs.uniwind.dev/api/platform-select) which are handy for platform differences.
It would be very nice to be able to define your own custom platform selectors somehow, based on information available in
Platformfromreact-nativeorDeviceform something likeexpo-device.This would allow more granular targeting of specific versions or device types.
Context
I'm right now trying to make our App work across iOS 18 and iOS 26 which feature significant differences because of the introduction of Liquid Glass which behaves different in many cases, and requires quite a few workarounds to arrive to something similar looking on iOS 18 where it's not supported.
Right now I'm sprinkling a bunch of specific version checks around in my classNames to handle set different sizes or padding based on the iOS version.
I have a bit of a similar thing going on as well to detect tablet sizing.
Some of the helpers I've defined so far:
Beta Was this translation helpful? Give feedback.
All reactions