Add support for paddingVertical, paddingHorizontal, borderVertical, borderHorizontal

* implement padding & border as arrays of values
* apply padding & border with the correct priority (e.g. left, horizontal, all)
* update transpiler & tests
This commit is contained in:
Felix Oghină
2014-11-20 17:59:40 +00:00
parent 6ee0c5817c
commit 8903bb15c6
5 changed files with 96 additions and 132 deletions

View File

@@ -54,12 +54,12 @@ function __transpileSingleTestToJava(code) {
return 'layout.' + (match1 == 'TOP' ? 'y' : 'x');
})
.replace( // style.position[CSS_TOP] => style.positionTop
/style\.(position|border|padding)\[CSS_(TOP|BOTTOM|LEFT|RIGHT)\]/g,
/style\.(position)\[CSS_(TOP|BOTTOM|LEFT|RIGHT)\]/g,
function (str, match1, match2) {
return 'style.' + match1 + match2[0] + match2.substring(1).toLowerCase();
})
.replace( // style.margin[CSS_TOP] => style.margin[CSSStyle.SPACING_TOP]
/style\.(margin)\[CSS_(TOP|BOTTOM|LEFT|RIGHT)\]/g,
/style\.(margin|border|padding)\[CSS_(TOP|BOTTOM|LEFT|RIGHT)\]/g,
function (str, match1, match2) {
return 'style.' + match1 + '[CSSStyle.SPACING_' + match2 + ']';
})