2018-04-12 02:23:35 +03:00
|
|
|
/*
|
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2018-11-26 16:50:29 +03:00
|
|
|
/* a word of explanation about the flex-shrink values employed here:
|
|
|
|
there are 3 priotized categories of screen real-estate grabbing,
|
|
|
|
each with a flex-shrink difference of 4 order of magnitude,
|
|
|
|
so they ideally wouldn't affect each other.
|
|
|
|
lowest category: .mx_RoomSubList
|
2018-12-18 16:32:46 +03:00
|
|
|
flex-shrink: 10000000
|
2018-11-26 16:50:29 +03:00
|
|
|
distribute size of items within the same categery by their size
|
|
|
|
middle category: .mx_RoomSubList.resized-sized
|
2018-12-18 16:32:46 +03:00
|
|
|
flex-shrink: 1000
|
2018-11-26 16:50:29 +03:00
|
|
|
applied when using the resizer, will have a max-height set to it,
|
|
|
|
to limit the size
|
|
|
|
highest category: .mx_RoomSubList.resized-all
|
2018-12-18 16:32:46 +03:00
|
|
|
flex-shrink: 1
|
2018-11-26 16:50:29 +03:00
|
|
|
small flex-shrink value (1), is only added if you can drag the resizer so far
|
|
|
|
so in practice you can only assign this category if there is enough space.
|
|
|
|
*/
|
|
|
|
|
2018-04-12 02:23:35 +03:00
|
|
|
.mx_RoomSubList {
|
2018-10-19 15:44:07 +03:00
|
|
|
min-height: 31px;
|
2018-11-26 16:50:29 +03:00
|
|
|
flex: 0 100000000 auto;
|
2018-10-18 17:25:22 +03:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2018-04-12 02:23:35 +03:00
|
|
|
|
2018-10-19 15:40:59 +03:00
|
|
|
.mx_RoomSubList_nonEmpty {
|
2018-12-18 16:32:26 +03:00
|
|
|
min-height: 70px;
|
2018-11-26 16:50:29 +03:00
|
|
|
|
|
|
|
.mx_AutoHideScrollbar_offset {
|
|
|
|
padding-bottom: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_hidden {
|
|
|
|
flex: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList.resized-all {
|
|
|
|
flex: 0 1 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList.resized-sized {
|
|
|
|
/* resizer set max-height on resized-sized,
|
|
|
|
so that limits the height and hence
|
|
|
|
needs a very small flex-shrink */
|
|
|
|
flex: 0 10000 auto;
|
2018-07-30 19:00:11 +03:00
|
|
|
}
|
|
|
|
|
2018-04-12 02:23:35 +03:00
|
|
|
.mx_RoomSubList_labelContainer {
|
2018-10-19 13:07:36 +03:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
2018-11-05 12:35:38 +03:00
|
|
|
align-items: center;
|
2018-10-19 15:44:07 +03:00
|
|
|
flex: 0 0 auto;
|
2018-11-06 16:03:01 +03:00
|
|
|
margin: 0 16px;
|
|
|
|
height: 36px;
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_label {
|
2018-10-19 13:07:36 +03:00
|
|
|
flex: 1;
|
2018-04-12 02:23:35 +03:00
|
|
|
cursor: pointer;
|
2018-11-06 16:03:01 +03:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 6px;
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
2018-11-06 16:03:01 +03:00
|
|
|
.mx_RoomSubList_label > span {
|
|
|
|
flex: 1 1 auto;
|
2018-04-12 02:23:35 +03:00
|
|
|
text-transform: uppercase;
|
|
|
|
color: $roomsublist-label-fg-color;
|
2018-05-26 02:07:39 +03:00
|
|
|
font-weight: 700;
|
2018-10-24 15:03:16 +03:00
|
|
|
font-size: 12px;
|
2018-11-06 16:03:01 +03:00
|
|
|
margin-left: 8px;
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_badge {
|
2018-11-06 16:03:01 +03:00
|
|
|
flex: 0 0 auto;
|
2018-11-05 12:35:38 +03:00
|
|
|
border-radius: 8px;
|
2018-04-12 02:23:35 +03:00
|
|
|
color: $accent-fg-color;
|
|
|
|
font-weight: 600;
|
2018-10-22 19:16:36 +03:00
|
|
|
font-size: 12px;
|
2018-11-05 12:35:38 +03:00
|
|
|
padding: 0 5px;
|
2018-04-12 02:23:35 +03:00
|
|
|
background-color: $accent-color;
|
|
|
|
}
|
|
|
|
|
2018-10-22 19:18:36 +03:00
|
|
|
.mx_RoomSubList_addRoom, .mx_RoomSubList_badge {
|
2018-11-06 16:03:01 +03:00
|
|
|
margin-left: 7px;
|
2018-10-22 19:18:36 +03:00
|
|
|
}
|
|
|
|
|
2018-10-19 13:07:36 +03:00
|
|
|
.mx_RoomSubList_addRoom {
|
|
|
|
background-color: $roomheader-addroom-color;
|
|
|
|
color: $roomsublist-background;
|
2018-11-05 16:25:28 +03:00
|
|
|
background-image: url('../../img/icons-room-add.svg');
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: center;
|
|
|
|
border-radius: 10px; // 16/2 + 2 padding
|
|
|
|
height: 16px;
|
|
|
|
flex: 0 0 16px;
|
|
|
|
background-clip: content-box;
|
2018-10-19 13:07:36 +03:00
|
|
|
}
|
|
|
|
|
2018-04-12 02:23:35 +03:00
|
|
|
.mx_RoomSubList_badgeHighlight {
|
|
|
|
background-color: $warning-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_chevron {
|
|
|
|
pointer-events: none;
|
2018-07-30 19:00:11 +03:00
|
|
|
background-image: url('../../img/topleft-chevron.svg');
|
2018-11-05 12:09:05 +03:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
transition: transform 0.2s ease-in;
|
2018-11-06 16:03:01 +03:00
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
background-position: center;
|
|
|
|
margin-left: 2px;
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_chevronDown {
|
2018-07-30 19:00:11 +03:00
|
|
|
transform: rotateZ(0deg);
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_chevronUp {
|
2018-07-30 19:00:11 +03:00
|
|
|
transform: rotateZ(180deg);
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_chevronRight {
|
2018-07-30 19:00:11 +03:00
|
|
|
transform: rotateZ(-90deg);
|
2018-04-12 02:23:35 +03:00
|
|
|
}
|
|
|
|
|
2018-11-01 18:34:12 +03:00
|
|
|
.mx_RoomSubList_scroll {
|
2018-11-26 16:50:29 +03:00
|
|
|
/* let rooms list grab as much space as it needs (auto),
|
|
|
|
potentially overflowing and showing a scrollbar */
|
2018-11-01 18:34:12 +03:00
|
|
|
flex: 0 1 auto;
|
2018-11-06 12:20:04 +03:00
|
|
|
padding: 0 8px;
|
2018-10-19 13:09:15 +03:00
|
|
|
}
|
|
|
|
|
2018-11-26 16:50:29 +03:00
|
|
|
// overflow indicators
|
|
|
|
.mx_RoomSubList:not(.resized-all) > .mx_RoomSubList_scroll {
|
|
|
|
&.mx_IndicatorScrollbar_topOverflow::before,
|
|
|
|
&.mx_IndicatorScrollbar_bottomOverflow::after {
|
|
|
|
position: sticky;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
2018-12-18 16:31:59 +03:00
|
|
|
height: 30px;
|
2018-11-26 16:50:29 +03:00
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
z-index: 100;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2018-11-12 14:57:21 +03:00
|
|
|
|
2018-11-26 16:50:29 +03:00
|
|
|
&.mx_IndicatorScrollbar_topOverflow > .mx_AutoHideScrollbar_offset {
|
2018-12-18 16:31:59 +03:00
|
|
|
margin-top: -30px;
|
2018-11-26 16:50:29 +03:00
|
|
|
}
|
|
|
|
&.mx_IndicatorScrollbar_bottomOverflow > .mx_AutoHideScrollbar_offset {
|
2018-12-18 16:31:59 +03:00
|
|
|
margin-bottom: -30px;
|
2018-11-26 16:50:29 +03:00
|
|
|
}
|
2018-11-12 14:57:21 +03:00
|
|
|
|
2018-11-26 16:50:29 +03:00
|
|
|
&.mx_IndicatorScrollbar_topOverflow::before {
|
|
|
|
top: 0;
|
|
|
|
background: linear-gradient($secondary-accent-color, transparent);
|
|
|
|
}
|
2018-11-12 14:57:21 +03:00
|
|
|
|
2018-11-26 16:50:29 +03:00
|
|
|
&.mx_IndicatorScrollbar_bottomOverflow::after {
|
|
|
|
bottom: 0;
|
|
|
|
background: linear-gradient(transparent, $secondary-accent-color);
|
|
|
|
}
|
2018-11-12 14:57:21 +03:00
|
|
|
}
|
|
|
|
|
2018-10-16 15:55:35 +03:00
|
|
|
.collapsed {
|
|
|
|
|
2018-11-05 16:22:55 +03:00
|
|
|
.mx_RoomSubList_scroll {
|
2018-11-06 12:20:04 +03:00
|
|
|
padding: 0;
|
2018-10-16 15:55:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSubList_labelContainer {
|
2018-11-06 16:03:01 +03:00
|
|
|
margin-right: 14px;
|
|
|
|
margin-left: 2px;
|
2018-10-16 15:55:35 +03:00
|
|
|
}
|
|
|
|
|
2018-11-06 16:03:01 +03:00
|
|
|
.mx_RoomSubList_addRoom {
|
|
|
|
margin-left: 3px;
|
2018-12-11 15:02:04 +03:00
|
|
|
margin-right: 10px;
|
2018-10-16 15:55:35 +03:00
|
|
|
}
|
|
|
|
|
2018-11-06 16:03:01 +03:00
|
|
|
.mx_RoomSubList_label > span {
|
2018-10-16 15:55:35 +03:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|