2020-06-05 01:34:04 +03: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.
|
|
|
|
*/
|
|
|
|
|
2020-10-15 01:30:38 +03:00
|
|
|
$groupFilterPanelWidth: 56px; // only applies in this file, used for calculations
|
2021-02-26 13:23:09 +03:00
|
|
|
$roomListCollapsedWidth: 68px;
|
2020-06-05 01:34:04 +03:00
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel {
|
2020-07-18 00:59:35 +03:00
|
|
|
background-color: $roomlist-bg-color;
|
2021-03-16 14:11:44 +03:00
|
|
|
// TODO decrease this once Spaces launches as it'll no longer need to include the 56px Community Panel
|
|
|
|
min-width: 206px;
|
2020-06-05 01:34:04 +03:00
|
|
|
max-width: 50%;
|
|
|
|
|
2020-10-10 15:30:06 +03:00
|
|
|
// Create a row-based flexbox for the GroupFilterPanel and the room list
|
2020-06-05 01:34:04 +03:00
|
|
|
display: flex;
|
|
|
|
|
2020-10-10 15:30:06 +03:00
|
|
|
.mx_LeftPanel_GroupFilterPanelContainer {
|
2020-06-05 01:34:04 +03:00
|
|
|
flex-grow: 0;
|
|
|
|
flex-shrink: 0;
|
2020-10-15 01:30:38 +03:00
|
|
|
flex-basis: $groupFilterPanelWidth;
|
2020-06-05 01:34:04 +03:00
|
|
|
height: 100%;
|
|
|
|
|
2020-10-10 15:30:06 +03:00
|
|
|
// Create another flexbox so the GroupFilterPanel fills the container
|
2020-06-05 01:34:04 +03:00
|
|
|
display: flex;
|
2020-10-30 00:54:47 +03:00
|
|
|
flex-direction: column;
|
2020-06-05 01:34:04 +03:00
|
|
|
|
2020-10-10 15:30:06 +03:00
|
|
|
// GroupFilterPanel handles its own CSS
|
2020-06-05 01:34:04 +03: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 00:22:18 +03:00
|
|
|
.mx_LeftPanel_roomListContainer {
|
2020-07-18 00:59:35 +03:00
|
|
|
background-color: $roomlist-bg-color;
|
2021-02-26 13:23:09 +03:00
|
|
|
flex: 1 0 0;
|
|
|
|
min-width: 0;
|
2020-06-05 01:34:04 +03:00
|
|
|
// Create another flexbox (this time a column) for the room list components
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_userHeader {
|
2020-07-10 04:54:11 +03:00
|
|
|
/* 12px top, 12px sides, 20px bottom (using 13px bottom to account
|
|
|
|
* for internal whitespace in the breadcrumbs)
|
|
|
|
*/
|
2020-07-10 20:06:48 +03:00
|
|
|
padding: 12px;
|
2020-07-10 17:52:46 +03:00
|
|
|
flex-shrink: 0; // to convince safari's layout engine the flexbox is fine
|
2020-06-05 01:34:04 +03:00
|
|
|
|
|
|
|
// Create another flexbox column for the rows to stack within
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-07-13 15:52:50 +03:00
|
|
|
}
|
2020-06-05 01:34:04 +03:00
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_breadcrumbsContainer {
|
2020-07-13 15:52:50 +03:00
|
|
|
overflow-y: hidden;
|
|
|
|
overflow-x: scroll;
|
2020-07-13 19:19:43 +03:00
|
|
|
margin: 12px 12px 0 12px;
|
2020-07-13 15:52:50 +03: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;
|
2020-07-09 21:24:02 +03:00
|
|
|
|
2020-07-13 15:52:50 +03:00
|
|
|
&.mx_IndicatorScrollbar_leftOverflow {
|
2020-07-13 19:20:40 +03:00
|
|
|
mask-image: linear-gradient(90deg, transparent, black 5%);
|
2020-07-13 15:52:50 +03:00
|
|
|
}
|
2020-07-09 21:24:02 +03:00
|
|
|
|
2020-07-13 15:52:50 +03:00
|
|
|
&.mx_IndicatorScrollbar_rightOverflow {
|
2020-07-13 19:20:40 +03:00
|
|
|
mask-image: linear-gradient(90deg, black, black 95%, transparent);
|
2020-07-13 15:52:50 +03:00
|
|
|
}
|
2020-07-09 21:24:02 +03:00
|
|
|
|
2020-07-13 15:52:50 +03:00
|
|
|
&.mx_IndicatorScrollbar_rightOverflow.mx_IndicatorScrollbar_leftOverflow {
|
2020-07-13 19:20:40 +03:00
|
|
|
mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
|
2020-06-05 01:34:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_filterContainer {
|
2020-06-09 05:33:21 +03:00
|
|
|
margin-left: 12px;
|
|
|
|
margin-right: 12px;
|
|
|
|
|
2020-07-10 17:52:46 +03:00
|
|
|
flex-shrink: 0; // to convince safari's layout engine the flexbox is fine
|
2020-07-10 04:15:46 +03:00
|
|
|
|
2020-06-09 05:33:21 +03:00
|
|
|
// Create a flexbox to organize the inputs
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2020-08-17 18:59:29 +03:00
|
|
|
.mx_RoomSearch_focused, .mx_RoomSearch_hasQuery {
|
|
|
|
& + .mx_LeftPanel_exploreButton {
|
|
|
|
// 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 03:30:22 +03:00
|
|
|
}
|
2020-06-09 05:33:21 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_exploreButton {
|
2020-08-14 20:53:56 +03:00
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
2020-07-18 00:59:35 +03:00
|
|
|
background-color: $roomlist-button-bg-color;
|
2020-06-09 05:33:21 +03:00
|
|
|
position: relative;
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2020-08-14 20:53:56 +03:00
|
|
|
top: 8px;
|
|
|
|
left: 8px;
|
2020-06-09 05:33:21 +03:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
2020-08-14 20:53:56 +03:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/explore.svg');
|
2020-06-09 05:33:21 +03:00
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
2020-08-14 20:53:56 +03:00
|
|
|
background: $secondary-fg-color;
|
2020-06-09 05:33:21 +03:00
|
|
|
}
|
2021-03-24 22:43:33 +03:00
|
|
|
|
|
|
|
&.mx_LeftPanel_exploreButton_space::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
|
|
|
|
}
|
2020-06-09 05:33:21 +03:00
|
|
|
}
|
2020-06-05 01:34:04 +03:00
|
|
|
}
|
|
|
|
|
2020-08-17 20:20:00 +03:00
|
|
|
.mx_LeftPanel_roomListFilterCount {
|
|
|
|
font-size: $font-13px;
|
2020-08-18 14:00:56 +03:00
|
|
|
font-weight: $font-semi-bold;
|
2020-08-17 20:20:00 +03:00
|
|
|
margin-left: 12px;
|
2020-08-18 14:00:56 +03:00
|
|
|
margin-top: 14px;
|
2020-08-17 20:20:00 +03:00
|
|
|
margin-bottom: -4px; // to counteract the normal roomListWrapper margin-top
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_roomListWrapper {
|
2020-07-08 15:49:04 +03:00
|
|
|
overflow: hidden;
|
2020-07-13 22:41:18 +03:00
|
|
|
margin-top: 10px; // so we're not up against the search/filter
|
2020-08-05 16:32:02 +03:00
|
|
|
flex: 1 0 0; // needed in Safari to properly set flex-basis
|
2020-07-08 15:49:04 +03:00
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
&.mx_LeftPanel_roomListWrapper_stickyBottom {
|
2020-07-08 15:49:38 +03:00
|
|
|
padding-bottom: 32px;
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
&.mx_LeftPanel_roomListWrapper_stickyTop {
|
2020-07-08 15:49:38 +03:00
|
|
|
padding-top: 32px;
|
|
|
|
}
|
2020-07-08 15:49:04 +03:00
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_actualRoomListContainer {
|
2020-06-13 20:54:40 +03:00
|
|
|
position: relative; // for sticky headers
|
2020-07-23 01:34:33 +03:00
|
|
|
height: 100%; // ensure scrolling still works
|
2020-06-05 01:34:04 +03:00
|
|
|
}
|
|
|
|
}
|
2020-06-11 23:39:28 +03:00
|
|
|
|
|
|
|
// These styles override the defaults for the minimized (66px) layout
|
2020-07-18 00:22:18 +03:00
|
|
|
&.mx_LeftPanel_minimized {
|
2020-06-11 23:39:28 +03:00
|
|
|
min-width: unset;
|
2021-02-26 13:23:09 +03:00
|
|
|
width: unset !important;
|
2020-06-11 23:39:28 +03:00
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_roomListContainer {
|
2021-02-26 13:23:09 +03:00
|
|
|
width: $roomListCollapsedWidth;
|
2020-06-11 23:39:28 +03:00
|
|
|
|
2020-12-15 16:45:10 +03:00
|
|
|
.mx_LeftPanel_userHeader {
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_filterContainer {
|
2020-06-11 23:39:28 +03:00
|
|
|
// Organize the flexbox into a centered column layout
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
|
2020-07-18 00:22:18 +03:00
|
|
|
.mx_LeftPanel_exploreButton {
|
2020-06-11 23:39:28 +03:00
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-05 01:34:04 +03:00
|
|
|
}
|