Within a polymer element I am trying to build a simple multi-column layout with lost-grid to render a list of items using dom-repeat. It looks like this:
HTML
<div class="grid">
<template is="dom-repeat" items="{{data}}">
<div class="grid__col">Example Content</div>
</template>
</div>
CSS
.grid {
lost-utility: clearfix;
lost-center: 100%;
position: relative;
}
.grid__col {
lost-column: 1/2 2 0px;
}
For example if the data array assigned to dom-repeat has 4 items, the following HTML is rendered:
<div class="grid">
<div class="grid__col">Example Content</div>
<div class="grid__col">Example Content</div>
<div class="grid__col">Example Content</div>
<div class="grid__col">Example Content</div>
</div>
Instead of displaying the columns at 50% width, the layout breaks and they are stacked on top of each other. If I remove the dom-repeat and list the 4 columns manually, it works. In both cases the code is the same in the end, so I'm guessing the rendering of the template somehow messes with the total width the columns can take up.
Another thing to note is that when using the exact same code inside a dom-bind template directly in the body of the page (outside of a polymer element but using dom-repeat), it works.