This code works as expected, check comments for an explanation. I added a few extra entries to see more scrolling...
Flexbox has a few quirks I cannot directly explain, one of them has to do with rounding numbers when calculating min/max height/widths. Not sure what causes where, but your problem is solved by putting all '__entry's inside a flexbox container.
I also removed a few redundant flexbox rules as you mostly need the default flex behaviour.
/* { outline: 1px dashed red } /* use for debugging */
ul.ChatLog,
li.Chatlog__entry {
list-style: none; padding: 0; margin: 0;
}
.ChatLog {
display: flex; /* Create main flex container */
flex-direction: column; /* as column of multiple rows */
max-height: 60px; /* maximum bounds for container */
overflow: auto;
}
.ChatLog__entry { /* removed redundant flex defs, defaults work*/
display: flex; /* as container for avatar and message */
min-width: 100%; /* makes parent grow to full width */
flex: 1; /* as child of Chatlog, fill full row */
margin-bottom: 5px; /* as you wanted => */
}
time { padding-left: 10px } /* create a bit of distance...*/
.ChatLog__entry:last-child {
margin-bottom: 0; /* => but not on the last */
}
.ChatLog__avatar > * { /* removed redundant flex defs, defaults work*/
z-index: 1;
height: 29px;
width: 29px;
border-radius: 3px;
}
.ChatLog__message {
flex: 1;
position: relative;
margin: 0 0 0 12px;
background-color: #000;
padding: 7px;
color: #fff;
font-size: 12px;
}
.ChatLog__message:before {
position: absolute;
right: auto;
top: .8em; /* added .2em to center arrow */
left: -12px;
height: 0;
content: '';
border: 6px solid transparent;
border-right-color: #ddd;
z-index: 2;
}
<ul class="ChatLog">
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
Hello!
<time class="ChatLog__timestamp">6 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
What is going on here?
<time class="ChatLog__timestamp">5 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
I
<time class="ChatLog__timestamp">3 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
Hello!
<time class="ChatLog__timestamp">6 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
What is going on here?
<time class="ChatLog__timestamp">5 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
I
<time class="ChatLog__timestamp">3 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
Hello!
<time class="ChatLog__timestamp">6 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
What is going on here?
<time class="ChatLog__timestamp">5 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
I
<time class="ChatLog__timestamp">3 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
Hello!
<time class="ChatLog__timestamp">6 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
What is going on here?
<time class="ChatLog__timestamp">5 minutes ago</time>
</p>
</li>
<li class="ChatLog__entry">
<div class="ChatLog__avatar">
<a class="" href=""><img src="http://placekitten.com/g/29/29" /></a>
</div>
<p class="ChatLog__message">
I
<time class="ChatLog__timestamp">3 minutes ago</time>
</p>
</li>
</ul>