During IPython 3 times, I could make my custom IPython.html.widgets.DOMWidget span the full width of the notebook by setting it's width trait (corresponding to the CSS width of the widget div) to 100 %. In Jupyter 4, that does not work anymore, the widget gets squashed to the left edge of the notebook. Web inspector tells me that the parent div.widget-subarea essentially has zero width up to padding. Is that a new feature or a bug? What is the exact widget API to achieve a full-width widget? I guess I'm bound for trouble if my widget's JS just sets the width of the parent wrapper to 100 % as well...
Apparently, that was due to a bug in the version of Jupyter I was using. The style for .widget-subarea in widget.css has gained a flex: 2 1 0%; property since, which was missing before, despite display: flex;.
IPython/Jupyter notebook widget span full width