White backgrounds are rendered transparent in SVG

+2 votes
asked Oct 10, 2018 in Bug by Rob Oxspring

The following diagram, but using red, correctly renders with a red background in both PNG and SVG formats. Similarly, the same diagram using transparent correctly creates semi-transparent PNGs and SVGs without a background. But when the background color is white (or unspecified) it appears that PNGs get a white background as expected, but SVGs are left with no background set and are therefore transparent.

@startuml
skinparam backgroundColor white
rectangle "White Background"
@enduml

1 Answer

0 votes
answered Nov 5 by GitNick (140 points)
Found the same to be true. Looking at the SVG output, the background style property is distinctly absent. My only workaround right now is to use an off-white, like `#fefefe`
...