I'm making a little chat/stream section for a site. The video has styles to make its always keep a 16:9 aspect ratio. The chat next to it I want to be the same height as the video. The chat box has overflow properties so that when the chat goes over a certain height it will stretch the parent container to show all the chat items in the div; which is to be expected. What I'm really asking is how I would make one flexbox column's height only go as far as the first one.
JSFIDDLE
https://jsfiddle.net/4bdrwh1f/14/
-What I want-
(Keep in mind I can't have a set height because when the screen resizes the height of the video changes to keep the aspect ratio)
-What I get-
(When I use height:100%)
So no overflow :/
HTML (The important bits)
<div className='stream-page-top'>
<div className='stream-page-main'>
<div className='stream-wrapper'>
<Video>
<source src={testVid} type='video/mp4'/>
</Video>
</div>
</div>
<div className='stream-page-aside'>
<div className='stream-page-chat-wrapper'>
<div className='chat-items'>
/* This is where chat items are rendered */
</div>
</div>
</div>
</div>
CSS
.stream-page-top {
@include flexbox();
.stream-page-main {
@include flex(5);
}
.stream-page-aside {
@include flex(2);
}
.stream-page-chat-wrapper {
@include flexbox();
@include flex-direction(column);
background-color: #021117;
width: 96%;
height: 100%;
margin: 0 auto;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
.chat-items {
@include flexbox();
@include flex-direction(column-reverse);
overflow: auto;
height: 100%;
}
}
}