element-web/res/css/structures/_RoomSubList.scss

166 lines
3.7 KiB
SCSS
Raw Normal View History

/*
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.
*/
.mx_RoomSubList {
2018-10-19 12:44:07 +00:00
min-height: 31px;
2018-11-01 15:34:12 +00:00
flex: 0 1 auto;
2018-10-18 14:25:22 +00:00
display: flex;
flex-direction: column;
}
.mx_RoomSubList_nonEmpty {
margin-bottom: 8px;
}
.mx_RoomSubList_labelContainer {
2018-10-19 10:07:36 +00:00
display: flex;
flex-direction: row;
2018-11-05 09:35:38 +00:00
align-items: center;
2018-10-19 12:44:07 +00:00
flex: 0 0 auto;
margin: 8px 19px 0 0;
}
.mx_RoomSubList_label {
2018-10-19 10:07:36 +00:00
flex: 1;
position: relative;
text-transform: uppercase;
color: $roomsublist-label-fg-color;
2018-05-25 23:07:39 +00:00
font-weight: 700;
2018-10-24 12:03:16 +00:00
font-size: 12px;
margin-left: 16px;
padding-left: 16px; /* gutter */
padding-right: 16px; /* gutter */
padding-top: 6px;
padding-bottom: 6px;
cursor: pointer;
background-color: $secondary-accent-color;
}
.mx_RoomSubList_label.mx_RoomSubList_fixed {
position: fixed;
top: 0;
z-index: 5;
/* pointer-events: none; */
}
.mx_RoomSubList_badge {
2018-11-05 09:35:38 +00:00
flex: 0 1 content;
border-radius: 8px;
color: $accent-fg-color;
font-weight: 600;
2018-10-22 16:16:36 +00:00
font-size: 12px;
2018-11-05 09:35:38 +00:00
padding: 0 5px;
background-color: $accent-color;
}
.mx_RoomSubList_label .mx_RoomSubList_badge:hover {
filter: brightness($focus-brightness);
}
.mx_RoomSubList_addRoom, .mx_RoomSubList_badge {
margin: 5px;
}
2018-10-19 10:07:36 +00:00
.mx_RoomSubList_addRoom {
background-color: $roomheader-addroom-color;
color: $roomsublist-background;
2018-11-05 13:25:28 +00: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;
padding: 2px;
2018-10-19 10:07:36 +00:00
}
.mx_RoomSubList_badgeHighlight {
background-color: $warning-color;
}
.mx_RoomSubList_chevron {
left: 0px;
pointer-events: none;
position: absolute;
top: 11px;
2018-11-05 09:09:05 +00:00
width: 10px;
height: 6px;
background-image: url('../../img/topleft-chevron.svg');
2018-11-05 09:09:05 +00:00
background-repeat: no-repeat;
transition: transform 0.2s ease-in;
}
.mx_RoomSubList_chevronDown {
transform: rotateZ(0deg);
}
.mx_RoomSubList_chevronUp {
transform: rotateZ(180deg);
}
.mx_RoomSubList_chevronRight {
transform: rotateZ(-90deg);
}
2018-11-01 15:34:12 +00:00
.mx_RoomSubList_scroll {
/* let rooms list grab all available space */
2018-11-01 15:34:12 +00:00
flex: 0 1 auto;
padding: 0 15px !important;
overflow-x: hidden;
2018-11-01 15:34:12 +00:00
}
/*
for browsers that don't support overlay scrollbars,
subtract scrollbar width from right padding on hover when overflowing
so the content doesn't jump when showing the scrollbars
*/
body.mx_scrollbar_nooverlay .mx_RoomSubList_scroll.mx_AutoHideScrollbar_overflow:hover {
padding-right: calc(15px - var(--scrollbar-width)) !important;
}
2018-10-16 12:55:35 +00:00
.collapsed {
.mx_RoomSubList_scroll {
padding: 0px !important;
}
2018-10-16 12:55:35 +00:00
.mx_RoomSubList_label {
height: 17px;
padding-right: 0;
2018-10-16 12:55:35 +00:00
width: 28px; /* collapsed LHS Panel width */
}
.mx_RoomSubList_labelContainer {
width: 28px; /* collapsed LHS Panel width */
}
.mx_RoomSubList_line {
display: none;
}
.mx_RoomSubList_moreBadge {
position: static;
margin-left: 16px;
margin-top: 2px;
}
.mx_RoomSubList_ellipsis {
height: 20px;
}
.mx_RoomSubList_more {
display: none;
}
}