mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add CSS support for line-height (#4534)
* Add CSS support for line-height (issue #1664) * Implemented @vakrilov's feedback * Implemented @vakrilov's feedback (changed Android default impl)
This commit is contained in:
committed by
Alexander Vakrilov
parent
3d49d1436d
commit
74f26f4498
@@ -378,6 +378,18 @@ export var testNativeFontSizeFromLocal = function () {
|
||||
});
|
||||
}
|
||||
|
||||
var expectedLineHeight = 10;
|
||||
export var testLocalLineHeightFromCss = function () {
|
||||
helper.buildUIAndRunTest(_createTextViewFunc(), function (views: Array<viewModule.View>) {
|
||||
var textView = <textViewModule.TextView>views[0];
|
||||
var page = <pagesModule.Page>views[1];
|
||||
|
||||
page.css = "textview { line-height: " + expectedLineHeight + "; }";
|
||||
var actualResult = textView.style.lineHeight;
|
||||
TKUnit.assert(actualResult === expectedLineHeight, "Actual: " + actualResult + "; Expected: " + expectedLineHeight);
|
||||
});
|
||||
}
|
||||
|
||||
var expectedColorHex = "#FFFF0000";
|
||||
var expectedNormalizedColorHex = "#FF0000";
|
||||
export var testLocalColorFromCss = function () {
|
||||
|
||||
Reference in New Issue
Block a user