Skip to content

Commit 59ed844

Browse files
committed
Background and border color transparency support for textboxes when color is undefined
1 parent 2f4da6e commit 59ed844

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/PhpWord/Writer/Word2007/Element/TextBox.php

+7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public function write(): void
5050

5151
if ($style->getBgColor()) {
5252
$xmlWriter->writeAttribute('fillcolor', $style->getBgColor());
53+
} else {
54+
$xmlWriter->writeAttribute('filled', 'f');
55+
}
56+
57+
if (!$style->getBorderColor()) {
58+
$xmlWriter->writeAttribute('stroked', 'f');
59+
$xmlWriter->writeAttribute('strokecolor', 'white');
5360
}
5461

5562
$styleWriter->write();

0 commit comments

Comments
 (0)