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:
Eddy Verbruggen
2017-07-13 14:00:18 +02:00
committed by Alexander Vakrilov
parent 3d49d1436d
commit 74f26f4498
7 changed files with 52 additions and 4 deletions

View File

@@ -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 () {