-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why round? #17
Comments
hi @Kerumen thanks for the info! I agree rounding is not needed. Could you make a pr? |
Without rounding, how can I fixed lineHeight which needs its value to be an integer? |
@pampang does not RN do it itself? |
@vitalets RN just alert an error, and that's all. |
Ok, got it. @Kerumen did you face such problems? |
@vitalets No, never. I just tried with RN 0.39.2 and a float line height, I don't have any warning. I don't think we should revert this change because at the moment the user can manually round as @pampang did. But if the library round, there is no way for the user to prevent this. I guess it's better in the way it is now. |
@pampang could you screenshot an alert? |
@vitalets |
Sorry I tested only on iOS. This seems to happen on Android. |
So, what is proper way to round line heights with EStyleSheet for Android? I found this solution:
|
hi @egormerkushev ! tileText: {
...
lineHeight: '$baseLineHeight*$h5FontSize',
} |
@vitalets I use RN 0.42 and using not whole values for line heights causes a crash on Android 6.0 for example. |
Yes, by facebook/react-native#7877 (comment) So especially for |
@vitalets yep. I upvoted for this feature request yesterday. If my solution is not bad - may be it will be useful for other developers. ✌🏻 |
I was wondering why round all calculated variables?
I blocked on this because I have a
borderWidth
variable of0.5
but it gets rounded to1
and it's frustrating..React Native already round the style for pixel snapping so it seems unneeded.
The text was updated successfully, but these errors were encountered: