Issues with CSS alignment with grid diagram and palette

There seems to be an issue when aligning HTML elements/blocks next to the diagram grid or palette. The issue persists even when display: inline-block is added on all components. As per our observation, some CSS properties are being added to the grid internally by GoJS. Is there a way to override these CSS properties in GoJS?

The following is the required layout for the Angular application.

alignment

The following shows the issue

GoJS does not set any style properties on any elements outside of its own HTML DIV element.

If you not actually create the Diagram for each of the corresponding DIV elements, does everything lay out the way that you expected?