Closed ItsWendell closed 4 years ago
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Not sure why the bot decided that this was not a good idea, would love to hear someone's opinion on it!
This adds support for the
screen
media type, next to all thePlatform.OS
types of React Native. This makes it easier for compatibility with converting browser CSS to React Native CSS with external libraries for example like Styled System / Emotion / Styled Components.The current media query would work in the browser, but not using extended stylesheet:
@media screen and (min-width: 40rem)
This PR simply replaces the word
screen
with the current platform:Platform.OS
to add support for media queries like this.As an example, I'm using this library in my newly published emotion-native-extended which basically adds support for responsive CSS in JS as for React Native using Emotion and Extended Stylesheet. This allows for support for third party extensions for Styled Component / Emotion but these sometimes rely on 'browser' media queries, for example: Styled System.
Merging this PR might make it easier for browser people to integrate and use their styling for the native platform.