Drawing Canvas Turning white from Dark background during drag drop

Hello, I am fairly new to bpmn-js. I am using a dark background for the canvas, it works fine so far. However, during dragging and dropping elements from the pallet, the canvas background is changing to white.

Which color or other options need to be changed to keep the canvas color constant.

I have used a custom renderer configuration to change the default stroke and fill colors. The background is set in the html element of the page for teh whole page.

this.bpmnViewer = new BpmnModeler({container: container, 
    								   width: 1300, 
    								   height: 700,
    								   bpmnRenderer: {defaultFillColor: '#11174a',//'#333'
    												  defaultStrokeColor: '#ffbf47'}//'#fff'

The solution is to override the style sheet background color of ‘svg’ element in the DOM. One way is as below

div.bjs-container > div.djs-container > svg{

	background: var(<color hex>) !important;


There could be some better solutions without using ‘!important’

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.