2020-06-04 03:16:53 +00: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-05 20:08:20 +00:00
|
|
|
// TODO: Rename to mx_RoomSublist during replacement of old component
|
|
|
|
|
2020-06-05 03:21:04 +00:00
|
|
|
.mx_RoomSublist2 {
|
|
|
|
// The sublist is a column of rows, essentially
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
margin-left: 8px;
|
|
|
|
margin-top: 12px;
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
|
|
.mx_RoomSublist2_headerContainer {
|
2020-06-08 19:42:18 +00:00
|
|
|
// Create a flexbox to make ordering easy
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.mx_RoomSublist2_badgeContainer {
|
|
|
|
opacity: 0.8;
|
|
|
|
padding-right: 7px;
|
|
|
|
|
|
|
|
// Create another flexbox row because it's super easy to position the badge at
|
|
|
|
// the end this way.
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSublist2_headerText {
|
|
|
|
text-transform: uppercase;
|
|
|
|
opacity: 0.5;
|
|
|
|
line-height: $font-16px;
|
|
|
|
font-size: $font-12px;
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
// Ellipsize any text overflow
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2020-06-05 03:21:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomSublist2_resizeBox {
|
2020-06-10 01:48:31 +00:00
|
|
|
margin-bottom: 4px; // for the resize handle
|
|
|
|
position: relative;
|
|
|
|
|
2020-06-05 03:21:04 +00:00
|
|
|
// Create another flexbox column for the tiles
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
overflow: hidden;
|
2020-06-05 14:48:23 +00:00
|
|
|
|
|
|
|
.mx_RoomSublist2_showMoreButton {
|
|
|
|
cursor: pointer;
|
2020-06-10 01:48:31 +00:00
|
|
|
font-size: $font-13px;
|
|
|
|
line-height: $font-18px;
|
|
|
|
color: $roomtile2-preview-color;
|
|
|
|
|
|
|
|
// This is the same color as the left panel background because it needs
|
|
|
|
// to occlude the lastmost tile in the list.
|
|
|
|
background-color: $header-panel-bg-color;
|
|
|
|
|
|
|
|
// Update the render() function for RoomSublist2 if these change
|
|
|
|
// Update the ListLayout class for minVisibleTiles if these change.
|
|
|
|
//
|
|
|
|
// At 24px high and 8px padding on the top this equates to 0.65 of
|
|
|
|
// a tile due to how the padding calculations work.
|
|
|
|
height: 24px;
|
|
|
|
padding-top: 8px;
|
|
|
|
|
|
|
|
// We force this to the bottom so it will overlap rooms as needed.
|
|
|
|
// We account for the space it takes up (24px) in the code through padding.
|
|
|
|
position: absolute;
|
|
|
|
bottom: 4px; // the height of the resize handle
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
2020-06-05 14:48:23 +00:00
|
|
|
|
|
|
|
// We create a flexbox to cheat at alignment
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-06-10 01:48:31 +00:00
|
|
|
|
|
|
|
.mx_RoomSublist2_showMoreButtonChevron {
|
|
|
|
position: relative;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
margin-left: 12px;
|
|
|
|
margin-right: 18px;
|
|
|
|
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
background: $roomtile2-preview-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Class name comes from the ResizableBox component
|
|
|
|
// The hover state needs to use the whole sublist, not just the resizable box,
|
|
|
|
// so that selector is below and one level higher.
|
|
|
|
.react-resizable-handle {
|
|
|
|
cursor: ns-resize;
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
|
|
// This is positioned directly below the 'show more' button.
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
|
|
|
|
// This is to visually align the bar in the list. Should be 12px from
|
|
|
|
// either side of the list. We define this after the positioning to
|
|
|
|
// trick the browser.
|
|
|
|
margin-left: 4px;
|
|
|
|
margin-right: 8px;
|
2020-06-05 14:48:23 +00:00
|
|
|
}
|
2020-06-05 03:21:04 +00:00
|
|
|
}
|
2020-06-10 01:48:31 +00:00
|
|
|
|
|
|
|
// The aforementioned selector for the hover state.
|
|
|
|
&:hover .react-resizable-handle {
|
|
|
|
opacity: 0.2;
|
|
|
|
|
|
|
|
// Update the render() function for RoomSublist2 if this changes
|
|
|
|
border: 2px solid $primary-fg-color;
|
|
|
|
}
|
2020-06-04 16:07:41 +00:00
|
|
|
}
|