Nov 7 2017
@Jdlrobson I think that CSS/JS should be part of Mediawiki (core style or some base style)
Nov 3 2017
Similar to T14396. But "should list the template" is not needed in some situations.
I also suggest to support reasonably low nesting (1 often, 2 rare and up to 4 max) at design stage.
Nov 2 2017
One solution is to use flexbox again: we start with 1 item and stop when they wrap.
Possible version without nested navboxes: http://jsfiddle.net/mh7vqt23/11/