mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-15 12:36:32 +00:00
Border Tweak
Do not override base style if conditional style indicates BORDER_OMIT. Do not export BORDER_NONE color 0 for conditional; same approach is already taken for unconditional.
This commit is contained in:
@@ -78,7 +78,11 @@ class StyleMerger
|
||||
|
||||
protected function mergeBorderStyle(Border $baseBorderStyle, Border $borderStyle): void
|
||||
{
|
||||
$baseBorderStyle->setBorderStyle($borderStyle->getBorderStyle());
|
||||
if ($borderStyle->getBorderStyle() !== Border::BORDER_OMIT) {
|
||||
$baseBorderStyle->setBorderStyle(
|
||||
$borderStyle->getBorderStyle()
|
||||
);
|
||||
}
|
||||
if ($borderStyle->getColor()->getARGB() !== null) {
|
||||
$baseBorderStyle->setColor($borderStyle->getColor());
|
||||
}
|
||||
|
||||
@@ -1658,7 +1658,9 @@ class Html extends BaseWriter
|
||||
$holdCss = '';
|
||||
}
|
||||
foreach ($styles as $key => $value) {
|
||||
$html .= $key . ':' . $value . ';';
|
||||
if (!str_starts_with($key, 'border-') || $value !== 'none #000000') {
|
||||
$html .= $key . ':' . $value . ';';
|
||||
}
|
||||
}
|
||||
$html .= '"';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user