Default HTML wrapper in MicroApp in preview has very small height. F.e. if you make a div element with 50% width and height the width seems to be quite as expected (half the preview area) while the height seems not to be influenced at all. This can be reperformed only with adaptive values, strict pixel values work just as expected.
Please refer example below:
HTML markup:
<div><h1>Hello world!!!</h1></div>
JavaScript:
app.init = function(cb) {
adaptiveDivIssue('yellow');
cb();
};
var adaptiveDivIssue = function(color) {
var doc = document.querySelectorAll('div');
for (var i = 0; i < doc.length; i++){
doc[i].style.width = '50%';
doc[i].style.height = '100%';
doc[i].style.backgroundColor = color;
}
};
Default HTML wrapper in MicroApp in preview has very small height. F.e. if you make a div element with 50% width and height the width seems to be quite as expected (half the preview area) while the height seems not to be influenced at all. This can be reperformed only with adaptive values, strict pixel values work just as expected.
Please refer example below: HTML markup:
JavaScript: