Skip to content

Commit

Permalink
fix css gallery bug
Browse files Browse the repository at this point in the history
also reduce the gallery margin/padding a bit.
and refactor a minor thing (turn the navbar size into an sass var)
  • Loading branch information
Simon-Laux committed Mar 10, 2020
1 parent 53b54cf commit eadd487
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions scss/_global.scss
Expand Up @@ -18,8 +18,8 @@ body {
}

.window {
height: calc(100vh - 50px);
margin-top: 50px;
height: $content-height;
margin-top: $nav-bar-height;
display: flex;
flex-direction: column;
flex-grow: 1;
Expand Down
2 changes: 2 additions & 0 deletions scss/_variables.scss
Expand Up @@ -5,6 +5,8 @@ $roboto: Roboto, $emojifonts, 'Helvetica Neue', Arial, Helvetica, NotoMono,
$roboto-light: Roboto-Light, $emojifonts, 'Helvetica Neue', Arial, Helvetica,
NotoMono, sans-serif;

$nav-bar-height: 50px;
$content-height: calc(100vh - #{$nav-bar-height});
/* Theming Colors */

// Belongs to stuff we plan to remove / change anyway
Expand Down
4 changes: 2 additions & 2 deletions scss/chat/_chat-list.scss
@@ -1,13 +1,13 @@
.chat-list {
width: 30%;
height: calc(100vh - 50px);
height: $content-height;
float: left;
overflow-y: auto;
border-right: var(--outlineProperties);
box-shadow: 0 0 4px 1px rgba(16, 22, 26, 0.1), 0 0 0 rgba(16, 22, 26, 0),
0 1px 1px rgba(16, 22, 26, 0.2);
user-select: none;
margin-top: 50px;
margin-top: $nav-bar-height;
}

.chatlist-item-skeleton {
Expand Down
12 changes: 9 additions & 3 deletions scss/gallery/_media.scss
@@ -1,13 +1,15 @@
$tab-height: 46px;

.media-view {
width: 70%;
background-color: var(--galleryBg);
float: right;
padding: 0 10px;
margin-top: 50px;
padding-left: 10px;
margin-top: $nav-bar-height;

& .gallery {
overflow: scroll;
padding-top: 20px;
height: calc(100vh - #{$tab-height} - #{$nav-bar-height});

& > .item {
float: left;
Expand All @@ -19,4 +21,8 @@
text-align: center;
margin-top: 5rem;
}

.bp3-tab-panel {
margin-top: 0;
}
}
2 changes: 1 addition & 1 deletion scss/main_screen/_main_screen.scss
Expand Up @@ -21,7 +21,7 @@
.no-chat-selected-screen {
width: 70%;
float: right;
height: calc(100vh - 50px);
height: $content-height;
margin-top: 50px;
text-align: center;
}
Expand Down
4 changes: 2 additions & 2 deletions scss/message/_message-list.scss
Expand Up @@ -3,8 +3,8 @@
float: right;
display: grid;
grid-template-columns: auto;
height: calc(100vh - 50px);
margin-top: 50px;
height: $content-height;
margin-top: $nav-bar-height;
background-image: var(--chatViewBgImgPath);
background-size: cover;
background-color: var(--chatViewBg);
Expand Down

0 comments on commit eadd487

Please sign in to comment.