{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/5073","labels_url":"https://api.github.com/repos/facebook/react-native/issues/5073/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/5073/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/5073/events","html_url":"https://github.com/facebook/react-native/issues/5073","id":124561332,"number":5073,"title":"Proposal: PixelRatio.pixel()","user":{"login":"corbt","id":176426,"avatar_url":"https://avatars.githubusercontent.com/u/176426?v=3","gravatar_id":"","url":"https://api.github.com/users/corbt","html_url":"https://github.com/corbt","followers_url":"https://api.github.com/users/corbt/followers","following_url":"https://api.github.com/users/corbt/following{/other_user}","gists_url":"https://api.github.com/users/corbt/gists{/gist_id}","starred_url":"https://api.github.com/users/corbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corbt/subscriptions","organizations_url":"https://api.github.com/users/corbt/orgs","repos_url":"https://api.github.com/users/corbt/repos","events_url":"https://api.github.com/users/corbt/events{/privacy}","received_events_url":"https://api.github.com/users/corbt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-01T21:08:25Z","updated_at":"2016-01-01T21:09:22Z","closed_at":null,"body":"It seems like a fairly common pattern to want a line that's the thinnest possible width. Currently this can be accomplished with a style something like:\r\n\r\n```js\r\nStyleSheet.create({\r\n  myStyle: {\r\n    borderBottomWidth: 1 / PixelRatio.get()\r\n    [...]\r\n  }\r\n});\r\n```\r\n\r\nThis works fine, but without reading the documentation of `PixelRatio` it's not obvious what's going on. \r\n\r\nI propose adding a function `PixelRatio.pixel` (or alternatively `PixelRatio.smallestPixel`) that simply returned the inverse of `PixelRatio.get`. This would make it immediately clear what a style using it is trying to accomplish, even to someone who hasn't read the PixelRatio documentation.\r\n\r\nI'm happy to implement and document this if there's general agreement that it's a good idea."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/168337308","html_url":"https://github.com/facebook/react-native/issues/5073#issuecomment-168337308","issue_url":"https://api.github.com/repos/facebook/react-native/issues/5073","id":168337308,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T21:09:22Z","updated_at":"2016-01-01T21:09:22Z","body":"Hey corbt, thanks for reporting this issue!\n\nReact Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.\n\n- If you **don't know how to do something** or **something is not working as you expect but not sure it's a bug**, please ask on [StackOverflow](http://stackoverflow.com/questions/tagged/react-native) with the tag `react-native` or for more real time interactions, ask on [Discord](https://discord.gg/0ZcbPKXt5bZjGY5n) in the #react-native channel.\n\n- If this is a **feature request or a bug** that you would like to be fixed, please report it on [Product Pains](https://productpains.com/product/react-native/). It has a ranking feature that lets us focus on the most important issues the community is experiencing.\n\n- We welcome clear issues and PRs that are ready for in-depth discussion. Please provide **screenshots** where appropriate and always mention the **version** of React Native you're using. Thank you for your contributions!\n"}}