I'm working on a status summary bar in Angular, and running into an issue where I can't get a flex-box based layout to look right.
It iterates through as many categories as exist, and puts an appropriate number of blocks for each category. The structure ends up looking like in this codepen: http://codepen.io/emoody/pen/OVKjVY
Angular Code:
<ul class="list-status">
<li ng-repeat="category in data">
<div ng-repeat="item in category"></div>
</li>
</ul>
SCSS styles:
.list-status{
width: 100%; margin: 0; padding: 0;
display: flex;
flex-flow: row nowrap;
li{
display: flex;
flex-grow: 1;
div{
height: 20px;
flex-grow: 1;
margin-right: 1px;
}
}
}
Doesn't have to be ul/li but as far as I know there does need to be some sort of container for each repeat layer, which is where the problem comes in.
The expected behavior is that a single row of divs should be rendered, all the same size. The result is that the categories with more items have tiny bars, and the others have lots of space between them.
I'm not sure if the best solution here is some other way of constructing the Angular section, or a different CSS solution.
EDIT adding images