2020-06-05 06:34:04 +08:00
|
|
|
/*
|
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2021-08-24 20:38:39 +08:00
|
|
|
$roomListCollapsedWidth: 68px;
|
2020-06-05 06:34:04 +08:00
|
|
|
|
2021-08-18 00:56:19 +08:00
|
|
|
.mx_MatrixChat--with-avatar {
|
|
|
|
.mx_LeftPanel,
|
|
|
|
.mx_LeftPanel .mx_LeftPanel_roomListContainer {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-17 16:25:57 +08:00
|
|
|
.mx_LeftPanel_outerWrapper {
|
2021-08-19 22:10:09 +08:00
|
|
|
display: flex;
|
2022-03-17 16:25:57 +08:00
|
|
|
flex-direction: column;
|
2021-08-19 22:10:09 +08:00
|
|
|
max-width: 50%;
|
2021-08-25 01:23:12 +08:00
|
|
|
position: relative;
|
|
|
|
|
2021-08-20 01:00:31 +08:00
|
|
|
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
|
|
|
|
contain: layout paint;
|
2022-03-17 16:25:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel_wrapper {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex: 1;
|
2022-03-22 14:44:03 +08:00
|
|
|
height: 100%; // ensure space panel is still scrollable with an outer wrapper
|
2021-08-23 22:20:21 +08:00
|
|
|
|
|
|
|
.mx_LeftPanel_wrapper--user {
|
2021-08-24 01:26:57 +08:00
|
|
|
background-color: $roomlist-bg-color;
|
2021-08-23 22:20:21 +08:00
|
|
|
display: flex;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
2021-08-24 20:38:39 +08:00
|
|
|
|
|
|
|
&[data-collapsed] {
|
|
|
|
max-width: $roomListCollapsedWidth;
|
|
|
|
}
|
2021-08-23 22:20:21 +08:00
|
|
|
}
|
2021-08-19 22:10:09 +08:00
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel {
|
2021-08-18 00:56:19 +08:00
|
|
|
background-color: $roomlist-bg-color;
|
2020-06-05 06:34:04 +08:00
|
|
|
|
2022-03-23 07:07:37 +08:00
|
|
|
// Create a row-based flexbox for the space panel and the room list
|
2020-06-05 06:34:04 +08:00
|
|
|
display: flex;
|
2021-06-01 18:21:59 +08:00
|
|
|
contain: content;
|
2021-06-25 16:20:03 +08:00
|
|
|
position: relative;
|
2021-08-24 19:05:46 +08:00
|
|
|
flex-grow: 1;
|
2021-08-24 22:06:20 +08:00
|
|
|
overflow: hidden;
|
2020-06-05 06:34:04 +08:00
|
|
|
|
|
|
|
// Note: The 'room list' in this context is actually everything that isn't the tag
|
|
|
|
// panel, such as the menu options, breadcrumbs, filtering, etc
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_roomListContainer {
|
2021-08-18 00:56:19 +08:00
|
|
|
background-color: $roomlist-bg-color;
|
2021-02-26 18:23:09 +08:00
|
|
|
flex: 1 0 0;
|
|
|
|
min-width: 0;
|
2020-06-05 06:34:04 +08:00
|
|
|
// Create another flexbox (this time a column) for the room list components
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_userHeader {
|
2020-07-10 09:54:11 +08:00
|
|
|
/* 12px top, 12px sides, 20px bottom (using 13px bottom to account
|
|
|
|
* for internal whitespace in the breadcrumbs)
|
|
|
|
*/
|
2020-07-11 01:06:48 +08:00
|
|
|
padding: 12px;
|
2020-07-10 22:52:46 +08:00
|
|
|
flex-shrink: 0; // to convince safari's layout engine the flexbox is fine
|
2020-06-05 06:34:04 +08:00
|
|
|
|
|
|
|
// Create another flexbox column for the rows to stack within
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-07-13 20:52:50 +08:00
|
|
|
}
|
2020-06-05 06:34:04 +08:00
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_breadcrumbsContainer {
|
2020-07-13 20:52:50 +08:00
|
|
|
overflow-y: hidden;
|
|
|
|
overflow-x: scroll;
|
2020-07-14 00:19:43 +08:00
|
|
|
margin: 12px 12px 0 12px;
|
2020-07-13 20:52:50 +08:00
|
|
|
flex: 0 0 auto;
|
|
|
|
// Create yet another flexbox, this time within the row, to ensure items stay
|
|
|
|
// aligned correctly. This is also a row-based flexbox.
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-06-01 18:21:59 +08:00
|
|
|
contain: content;
|
2020-07-10 02:24:02 +08:00
|
|
|
|
2020-07-13 20:52:50 +08:00
|
|
|
&.mx_IndicatorScrollbar_leftOverflow {
|
2020-07-14 00:20:40 +08:00
|
|
|
mask-image: linear-gradient(90deg, transparent, black 5%);
|
2020-07-13 20:52:50 +08:00
|
|
|
}
|
2020-07-10 02:24:02 +08:00
|
|
|
|
2020-07-13 20:52:50 +08:00
|
|
|
&.mx_IndicatorScrollbar_rightOverflow {
|
2020-07-14 00:20:40 +08:00
|
|
|
mask-image: linear-gradient(90deg, black, black 95%, transparent);
|
2020-07-13 20:52:50 +08:00
|
|
|
}
|
2020-07-10 02:24:02 +08:00
|
|
|
|
2020-07-13 20:52:50 +08:00
|
|
|
&.mx_IndicatorScrollbar_rightOverflow.mx_IndicatorScrollbar_leftOverflow {
|
2020-07-14 00:20:40 +08:00
|
|
|
mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_filterContainer {
|
2021-12-01 02:08:46 +08:00
|
|
|
margin: 0 12px;
|
|
|
|
padding: 12px 0 8px;
|
|
|
|
border-bottom: 1px solid $quinary-content;
|
2020-06-09 10:33:21 +08:00
|
|
|
|
2020-07-10 22:52:46 +08:00
|
|
|
flex-shrink: 0; // to convince safari's layout engine the flexbox is fine
|
2020-07-10 09:15:46 +08:00
|
|
|
|
2020-06-09 10:33:21 +08:00
|
|
|
// Create a flexbox to organize the inputs
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2021-12-01 02:08:46 +08:00
|
|
|
& + .mx_RoomListHeader {
|
|
|
|
margin-top: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSearch_shortcutPrompt {
|
|
|
|
border-radius: 6px;
|
|
|
|
background-color: $panel-actions;
|
|
|
|
padding: 2px 4px;
|
|
|
|
user-select: none;
|
|
|
|
font-size: $font-12px;
|
|
|
|
line-height: $font-15px;
|
|
|
|
font-weight: $font-semi-bold;
|
|
|
|
color: $light-fg-color;
|
|
|
|
margin-right: 6px;
|
|
|
|
}
|
|
|
|
|
2020-08-17 23:59:29 +08:00
|
|
|
.mx_RoomSearch_focused, .mx_RoomSearch_hasQuery {
|
2021-12-01 02:08:46 +08:00
|
|
|
.mx_RoomSearch_shortcutPrompt {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2021-12-01 18:50:06 +08:00
|
|
|
& + .mx_LeftPanel_exploreButton,
|
|
|
|
& + .mx_LeftPanel_recentsButton {
|
2020-08-17 23:59:29 +08:00
|
|
|
// Cheaty way to return the occupied space to the filter input
|
|
|
|
flex-basis: 0;
|
|
|
|
margin: 0;
|
|
|
|
width: 0;
|
|
|
|
|
|
|
|
// Don't forget to hide the masked ::before icon,
|
|
|
|
// using display:none or visibility:hidden would break accessibility
|
|
|
|
&::before {
|
|
|
|
content: none;
|
|
|
|
}
|
2020-07-05 08:30:22 +08:00
|
|
|
}
|
2020-06-09 10:33:21 +08:00
|
|
|
}
|
|
|
|
|
2021-06-25 18:45:15 +08:00
|
|
|
.mx_LeftPanel_dialPadButton {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
2021-11-29 20:52:09 +08:00
|
|
|
background-color: $panel-actions;
|
2021-06-25 18:45:15 +08:00
|
|
|
position: relative;
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 8px;
|
|
|
|
left: 8px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
mask-image: url('$(res)/img/element-icons/call/dialpad.svg');
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
2021-12-01 18:50:06 +08:00
|
|
|
background-color: $secondary-content;
|
2021-06-25 18:45:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-01 18:50:06 +08:00
|
|
|
.mx_LeftPanel_exploreButton,
|
|
|
|
.mx_LeftPanel_recentsButton {
|
2020-08-15 01:53:56 +08:00
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
2021-11-29 20:52:09 +08:00
|
|
|
background-color: $panel-actions;
|
2020-06-09 10:33:21 +08:00
|
|
|
position: relative;
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2020-08-15 01:53:56 +08:00
|
|
|
top: 8px;
|
|
|
|
left: 8px;
|
2020-06-09 10:33:21 +08:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
2021-12-01 18:50:06 +08:00
|
|
|
background-color: $secondary-content;
|
2020-06-09 10:33:21 +08:00
|
|
|
}
|
2021-03-25 03:43:33 +08:00
|
|
|
|
2021-12-01 02:08:46 +08:00
|
|
|
&:hover {
|
|
|
|
background-color: $tertiary-content;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
background-color: $background;
|
|
|
|
}
|
2021-03-25 03:43:33 +08:00
|
|
|
}
|
2020-06-09 10:33:21 +08:00
|
|
|
}
|
2021-12-01 18:50:06 +08:00
|
|
|
|
|
|
|
.mx_LeftPanel_exploreButton::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/explore.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel_recentsButton::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/clock.svg');
|
|
|
|
}
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|
|
|
|
|
2020-08-18 01:20:00 +08:00
|
|
|
.mx_LeftPanel_roomListFilterCount {
|
|
|
|
font-size: $font-13px;
|
2020-08-18 19:00:56 +08:00
|
|
|
font-weight: $font-semi-bold;
|
2020-08-18 01:20:00 +08:00
|
|
|
margin-left: 12px;
|
2020-08-18 19:00:56 +08:00
|
|
|
margin-top: 14px;
|
2020-08-18 01:20:00 +08:00
|
|
|
margin-bottom: -4px; // to counteract the normal roomListWrapper margin-top
|
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_roomListWrapper {
|
2021-08-24 19:05:46 +08:00
|
|
|
// Make the y-scrollbar more responsive
|
|
|
|
padding-right: 2px;
|
2020-07-08 20:49:04 +08:00
|
|
|
overflow: hidden;
|
2020-07-14 03:41:18 +08:00
|
|
|
margin-top: 10px; // so we're not up against the search/filter
|
2020-08-05 21:32:02 +08:00
|
|
|
flex: 1 0 0; // needed in Safari to properly set flex-basis
|
2020-07-08 20:49:04 +08:00
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
&.mx_LeftPanel_roomListWrapper_stickyBottom {
|
2020-07-08 20:49:38 +08:00
|
|
|
padding-bottom: 32px;
|
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
&.mx_LeftPanel_roomListWrapper_stickyTop {
|
2020-07-08 20:49:38 +08:00
|
|
|
padding-top: 32px;
|
|
|
|
}
|
2020-07-08 20:49:04 +08:00
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_actualRoomListContainer {
|
2020-06-14 01:54:40 +08:00
|
|
|
position: relative; // for sticky headers
|
2020-07-23 06:34:33 +08:00
|
|
|
height: 100%; // ensure scrolling still works
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|
|
|
|
}
|
2020-06-12 04:39:28 +08:00
|
|
|
|
|
|
|
// These styles override the defaults for the minimized (66px) layout
|
2020-07-18 05:22:18 +08:00
|
|
|
&.mx_LeftPanel_minimized {
|
2021-08-24 19:05:46 +08:00
|
|
|
flex-grow: 0;
|
2020-06-12 04:39:28 +08:00
|
|
|
min-width: unset;
|
2021-02-26 18:23:09 +08:00
|
|
|
width: unset !important;
|
2020-06-12 04:39:28 +08:00
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_roomListContainer {
|
2021-08-24 20:38:39 +08:00
|
|
|
width: $roomListCollapsedWidth;
|
2020-06-12 04:39:28 +08:00
|
|
|
|
2020-12-15 21:45:10 +08:00
|
|
|
.mx_LeftPanel_userHeader {
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
2020-07-18 05:22:18 +08:00
|
|
|
.mx_LeftPanel_filterContainer {
|
2020-06-12 04:39:28 +08:00
|
|
|
// Organize the flexbox into a centered column layout
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
|
2021-06-25 18:45:15 +08:00
|
|
|
.mx_LeftPanel_dialPadButton {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
2021-12-01 18:50:06 +08:00
|
|
|
.mx_LeftPanel_exploreButton,
|
|
|
|
.mx_LeftPanel_recentsButton {
|
2020-06-12 04:39:28 +08:00
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|