After spending several hours trying to solve this problem, I've hit a roadblock.
The challenge lies in dynamically adding items to a list using JavaScript and the Dojo library. I've experimented with both vanilla JS and Dojo code, ruling that part out.
The main issue arises when new list items are appended to the existing list - they don't inherit all the CSS styles of the other elements. Certain styles like 'white-space: nowrap' and margins seem to be missing or not applied correctly.
To view the code, click here: http://jsbin.com/omEJoBAf/2/
Here's a screenshot of how it appears in my application: https://i.sstatic.net/ZQbC4.jpg