Line-height property breaks text alignment on Button (iOS)
#6,429 建立於 2018年10月18日
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Component nativescript has 5.0.0-2018-10-15-12485 version and is up to date. ✔ Component tns-core-modules has 4.2.1 version and is up to date. ✔ Component tns-ios has 4.2.0 version and is up to date. Android not tested
Describe the bug Only occurs with the button. When using the attribute or CSS style for line-height combined with text-alignment, the line-height attribute will cause the contents to always be left-aligned.
To Reproduce
Add button and style with textWrap="true" , line-height and text-aligment:center.
.btn-test{ text-align:center; line-height:40; }
The first screen shows the button without using the line-height, only with textalign = center. The second screen shows the use of the line-height with the TextAlign center.
Expected behavior Button text should keep the assigned text-align property.
Sample project
Additional context Very similar behavior as in the case of another application
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.