Skip to content

Commit

Permalink
Animate status bar max-height and margin-top
Browse files Browse the repository at this point in the history
When collapsed, the max-height is set to 0px. When expanded, max-height is set to 50px, margin-top is set to 0px. When expanded and when the timeline is not scrolled down to the bottom, margin-top is set to -50px to offset the change in height, keeping it at the same scroll position.

Without the animation, there would be a jump when the user starts scrolling up from the bottom whilst the StatusBar is expanded.
  • Loading branch information
lukebarnard1 committed Jan 18, 2017
1 parent 205676a commit f10bc8e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/skins/vector/css/matrix-react-sdk/structures/RoomView.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,25 @@ hr.mx_RoomView_myReadMarker {
width: 100%;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;

max-height: 0px;
background-color: #fff;
z-index: 1000;
overflow: hidden;

-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-ms-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
}

.mx_RoomView_statusArea_expanded {
max-height: 50px;
margin-top: 0px;
}

.mx_RoomView_statusArea_expanded.mx_RoomView_statusArea_mid_timeline {
margin-top: -50px;
}

.mx_RoomView_statusAreaBox {
Expand Down

0 comments on commit f10bc8e

Please sign in to comment.