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.
|
|
|
|
*/
|
|
|
|
|
2020-06-29 10:03:04 +08:00
|
|
|
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
|
2020-06-06 04:08:20 +08:00
|
|
|
|
2020-06-13 03:52:54 +08:00
|
|
|
$tagPanelWidth: 70px; // only applies in this file, used for calculations
|
2020-06-05 06:34:04 +08:00
|
|
|
|
|
|
|
.mx_LeftPanel2 {
|
2020-06-13 03:52:54 +08:00
|
|
|
background-color: $roomlist2-bg-color;
|
2020-06-05 06:34:04 +08:00
|
|
|
min-width: 260px;
|
|
|
|
max-width: 50%;
|
|
|
|
|
|
|
|
// Create a row-based flexbox for the TagPanel and the room list
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.mx_LeftPanel2_tagPanelContainer {
|
|
|
|
flex-grow: 0;
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-basis: $tagPanelWidth;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
// Create another flexbox so the TagPanel fills the container
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
// TagPanel handles its own CSS
|
|
|
|
}
|
|
|
|
|
2020-06-26 10:35:40 +08:00
|
|
|
&:not(.mx_LeftPanel2_hasTagPanel) {
|
|
|
|
.mx_LeftPanel2_roomListContainer {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
.mx_LeftPanel2_roomListContainer {
|
|
|
|
width: calc(100% - $tagPanelWidth);
|
|
|
|
|
|
|
|
// Create another flexbox (this time a column) for the room list components
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
.mx_LeftPanel2_userHeader {
|
2020-06-26 05:07:38 +08:00
|
|
|
padding: 12px 12px 20px; // 12px top, 12px sides, 20px bottom
|
2020-06-05 06:34:04 +08:00
|
|
|
|
|
|
|
// Create another flexbox column for the rows to stack within
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2020-06-26 09:38:11 +08:00
|
|
|
// This is basically just breadcrumbs. The row above that is handled by the UserMenu
|
2020-06-05 06:34:04 +08:00
|
|
|
.mx_LeftPanel2_headerRow {
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel2_breadcrumbsContainer {
|
|
|
|
width: 100%;
|
2020-07-01 06:24:46 +08:00
|
|
|
overflow-y: hidden;
|
|
|
|
overflow-x: scroll;
|
2020-06-09 07:11:58 +08:00
|
|
|
margin-top: 8px;
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel2_filterContainer {
|
2020-06-09 10:33:21 +08:00
|
|
|
margin-left: 12px;
|
|
|
|
margin-right: 12px;
|
|
|
|
|
|
|
|
// Create a flexbox to organize the inputs
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.mx_RoomSearch_expanded + .mx_LeftPanel2_exploreButton {
|
|
|
|
// Cheaty way to return the occupied space to the filter input
|
2020-07-05 08:30:22 +08:00
|
|
|
flex-basis: 0;
|
2020-06-09 10:33:21 +08:00
|
|
|
margin: 0;
|
|
|
|
width: 0;
|
|
|
|
|
2020-07-05 08:30:22 +08:00
|
|
|
// Don't forget to hide the masked ::before icon,
|
|
|
|
// using display:none or visibility:hidden would break accessibility
|
|
|
|
&::before {
|
|
|
|
content: none;
|
|
|
|
}
|
2020-06-09 10:33:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel2_exploreButton {
|
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
border-radius: 20px;
|
2020-06-13 03:52:54 +08:00
|
|
|
background-color: $roomlist2-button-bg-color;
|
2020-06-09 10:33:21 +08:00
|
|
|
position: relative;
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 6px;
|
|
|
|
left: 6px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
mask-image: url('$(res)/img/feather-customised/compass.svg');
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
background: $primary-fg-color;
|
|
|
|
}
|
|
|
|
}
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_LeftPanel2_actualRoomListContainer {
|
|
|
|
flex-grow: 1; // fill the available space
|
|
|
|
overflow-y: auto;
|
2020-06-11 05:05:17 +08:00
|
|
|
width: 100%;
|
|
|
|
max-width: 100%;
|
2020-06-14 01:54:40 +08:00
|
|
|
position: relative; // for sticky headers
|
2020-06-11 05:05:17 +08:00
|
|
|
|
|
|
|
// Create a flexbox to trick the layout engine
|
|
|
|
display: flex;
|
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
|
|
|
|
&.mx_LeftPanel2_minimized {
|
|
|
|
min-width: unset;
|
|
|
|
|
|
|
|
// We have to forcefully set the width to override the resizer's style attribute.
|
2020-06-26 10:35:40 +08:00
|
|
|
&.mx_LeftPanel2_hasTagPanel {
|
|
|
|
width: calc(68px + $tagPanelWidth) !important;
|
|
|
|
}
|
|
|
|
&:not(.mx_LeftPanel2_hasTagPanel) {
|
|
|
|
width: 68px !important;
|
|
|
|
}
|
2020-06-12 04:39:28 +08:00
|
|
|
|
|
|
|
.mx_LeftPanel2_roomListContainer {
|
|
|
|
width: 68px;
|
|
|
|
|
|
|
|
.mx_LeftPanel2_filterContainer {
|
|
|
|
// Organize the flexbox into a centered column layout
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.mx_LeftPanel2_exploreButton {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-05 06:34:04 +08:00
|
|
|
}
|