Code style

This commit is contained in:
lubosdz 2020-07-13 18:48:27 +02:00
parent 889f4e3381
commit 38788e0c7e
1 changed files with 11 additions and 7 deletions

View File

@ -110,7 +110,7 @@ class Html
case 'width':
// tables, cells
if (false !== strpos($val, '%')) {
// e.g. <table width="100%"> or <td width=50%>
// e.g. <table width="100%"> or <td width="50%">
$styles['width'] = intval($val) * 50;
$styles['unit'] = \PhpOffice\PhpWord\SimpleType\TblWidth::PERCENT;
} else {
@ -883,6 +883,10 @@ class Html
case 'baseline':
return 'top';
default:
// @discuss - which one should apply:
// - Word uses default vert. alignment: top
// - all browsers use default vert. alignment: middle
// Returning empty string means attribute wont be set so use Word default (top).
return '';
}
}