2020-06-05 00:34:04 +02: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.
|
|
|
|
*/
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Note: the room tile expects to be in a flexbox column container */
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile {
|
2020-06-05 22:08:20 +02:00
|
|
|
margin-bottom: 4px;
|
|
|
|
padding: 4px;
|
2020-06-05 05:21:04 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* The tile is also a flexbox row itself */
|
2022-04-01 16:36:10 +02:00
|
|
|
display: flex;
|
2022-07-27 15:39:29 +02:00
|
|
|
contain: content; /* Not strict as it will break when resizing a sublist vertically */
|
2021-06-01 12:21:59 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
font-size: $font-13px;
|
2020-06-05 05:21:04 +02:00
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
&.mx_RoomTile_selected,
|
2020-07-02 23:21:10 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
2020-07-17 23:43:29 +02:00
|
|
|
&.mx_RoomTile_hasMenuOpen {
|
2021-08-25 09:17:22 +02:00
|
|
|
background-color: $panel-actions;
|
2020-07-09 19:17:47 +02:00
|
|
|
border-radius: 8px;
|
2020-06-05 22:08:20 +02:00
|
|
|
}
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_DecoratedRoomAvatar,
|
|
|
|
.mx_RoomTile_avatarContainer {
|
2022-03-22 23:14:11 +01:00
|
|
|
margin-right: 10px;
|
2020-06-05 05:21:04 +02:00
|
|
|
}
|
|
|
|
|
2022-05-09 14:04:44 +02:00
|
|
|
.mx_RoomTile_details {
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_titleContainer {
|
|
|
|
height: 32px;
|
|
|
|
min-width: 0;
|
|
|
|
flex-basis: 0;
|
2020-06-10 07:09:15 +02:00
|
|
|
flex-grow: 1;
|
2022-07-27 15:39:29 +02:00
|
|
|
margin-right: 8px; /* spacing to buttons/badges */
|
2022-04-01 16:36:10 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Create a new column layout flexbox for the title parts */
|
2020-06-05 05:21:04 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2022-04-01 16:36:10 +02:00
|
|
|
justify-content: center;
|
2020-06-08 21:42:18 +02:00
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_RoomTile_title,
|
|
|
|
.mx_RoomTile_subtitle {
|
2022-04-01 16:36:10 +02:00
|
|
|
width: 100%;
|
2022-03-22 23:14:11 +01:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Ellipsize any text overflow */
|
2022-04-01 16:36:10 +02:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2022-03-22 23:14:11 +01:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_title {
|
|
|
|
font-size: $font-14px;
|
|
|
|
line-height: $font-18px;
|
2022-03-22 23:14:11 +01:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
&.mx_RoomTile_titleHasUnreadEvents {
|
|
|
|
font-weight: 600;
|
2022-03-22 23:14:11 +01:00
|
|
|
}
|
2022-04-01 16:36:10 +02:00
|
|
|
}
|
2020-07-02 13:18:48 +02:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_subtitle {
|
|
|
|
line-height: $font-18px;
|
|
|
|
color: $secondary-content;
|
2020-07-02 13:18:48 +02:00
|
|
|
}
|
2020-06-10 07:09:15 +02:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_titleWithSubtitle {
|
2022-07-27 15:39:29 +02:00
|
|
|
margin-top: -3px; /* shift the title up a bit more */
|
2022-04-01 16:36:10 +02:00
|
|
|
}
|
|
|
|
}
|
2020-06-10 07:09:15 +02:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_notificationsButton {
|
2022-07-27 15:39:29 +02:00
|
|
|
margin-left: 4px; /* spacing between buttons */
|
2022-04-01 16:36:10 +02:00
|
|
|
}
|
2020-06-30 01:16:51 +02:00
|
|
|
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_badgeContainer {
|
|
|
|
height: 16px;
|
2022-07-27 15:39:29 +02:00
|
|
|
/* don't set width so that it takes no space when there is no badge to show */
|
|
|
|
margin: auto 0; /* vertically align */
|
2022-03-22 23:14:11 +01:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Create a flexbox to make aligning dot badges easier */
|
2022-04-01 16:36:10 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.mx_NotificationBadge {
|
2022-07-27 15:39:29 +02:00
|
|
|
margin-right: 2px; /* centering */
|
2022-04-01 16:36:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_dot {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* make the smaller dot occupy the same width for centering */
|
2022-04-01 16:36:10 +02:00
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: 7px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* The context menu buttons are hidden by default */
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_menuButton,
|
|
|
|
.mx_RoomTile_notificationsButton {
|
|
|
|
width: 20px;
|
2022-07-27 15:39:29 +02:00
|
|
|
min-width: 20px; /* yay flex */
|
2022-04-01 16:36:10 +02:00
|
|
|
height: 20px;
|
|
|
|
margin-top: auto;
|
|
|
|
margin-bottom: auto;
|
|
|
|
position: relative;
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
top: 2px;
|
|
|
|
left: 2px;
|
2022-12-12 12:24:14 +01:00
|
|
|
content: "";
|
2022-04-01 16:36:10 +02:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
position: absolute;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
background: $primary-content;
|
2022-03-22 23:14:11 +01:00
|
|
|
}
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* If the room has an overriden notification setting then we always show the notifications menu button */
|
2022-04-01 16:36:10 +02:00
|
|
|
.mx_RoomTile_notificationsButton.mx_RoomTile_notificationsButton_show {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_menuButton::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/context-menu.svg");
|
2022-04-01 16:36:10 +02:00
|
|
|
}
|
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
&:not(.mx_RoomTile_minimized) {
|
2020-07-02 23:21:10 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
2020-07-17 23:43:29 +02:00
|
|
|
&.mx_RoomTile_hasMenuOpen {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Hide the badge container on hover because it'll be a menu button */
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_badgeContainer {
|
2020-06-11 22:39:28 +02:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2020-07-02 13:18:48 +02:00
|
|
|
display: none;
|
2020-06-11 22:39:28 +02:00
|
|
|
}
|
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_notificationsButton,
|
|
|
|
.mx_RoomTile_menuButton {
|
2020-06-30 01:16:51 +02:00
|
|
|
display: block;
|
2020-06-11 22:39:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
&.mx_RoomTile_minimized {
|
2020-06-11 22:39:28 +02:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_DecoratedRoomAvatar,
|
|
|
|
.mx_RoomTile_avatarContainer {
|
2020-06-11 22:39:28 +02:00
|
|
|
margin-right: 0;
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* We use these both in context menus and the room tiles */
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconBell::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/notifications.svg");
|
2020-06-30 01:16:51 +02:00
|
|
|
}
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconBellDot::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-default.svg");
|
2020-06-30 01:16:51 +02:00
|
|
|
}
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconBellCrossed::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-off.svg");
|
2020-06-30 01:16:51 +02:00
|
|
|
}
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconBellMentions::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-dm.svg");
|
2020-07-01 14:59:50 +02:00
|
|
|
}
|
2020-06-30 01:16:51 +02:00
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_contextMenu {
|
|
|
|
.mx_RoomTile_iconStar::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconArrowDown::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/low-priority.svg");
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
|
|
|
|
2021-11-15 12:39:25 +01:00
|
|
|
.mx_RoomTile_iconNotificationsDefault::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/notifications.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_iconNotificationsAllMessages::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-default.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_iconNotificationsMentionsKeywords::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-dm.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_iconNotificationsNone::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/roomlist/notifications-off.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_iconPeople::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/members.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile_iconFiles::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/files.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
2022-02-28 15:52:16 +01:00
|
|
|
.mx_RoomTile_iconPins::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/pin-upright.svg");
|
2022-02-28 15:52:16 +01:00
|
|
|
}
|
|
|
|
|
2021-11-15 12:39:25 +01:00
|
|
|
.mx_RoomTile_iconWidgets::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/apps.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconSettings::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/settings.svg");
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
2021-02-15 16:22:19 +01:00
|
|
|
|
2021-11-15 12:39:25 +01:00
|
|
|
.mx_RoomTile_iconExport::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/export.svg");
|
2021-11-15 12:39:25 +01:00
|
|
|
}
|
|
|
|
|
2022-03-23 21:17:57 +01:00
|
|
|
.mx_RoomTile_iconDeveloperTools::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/settings/flask.svg");
|
2022-03-23 21:17:57 +01:00
|
|
|
}
|
|
|
|
|
2021-07-16 10:07:52 +02:00
|
|
|
.mx_RoomTile_iconCopyLink::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/link.svg");
|
2021-07-16 10:07:52 +02:00
|
|
|
}
|
|
|
|
|
2021-02-15 14:43:09 +01:00
|
|
|
.mx_RoomTile_iconInvite::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/invite.svg");
|
2021-02-15 14:43:09 +01:00
|
|
|
}
|
2020-06-10 07:09:15 +02:00
|
|
|
|
2020-07-17 23:43:29 +02:00
|
|
|
.mx_RoomTile_iconSignOut::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/leave.svg");
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
2020-06-05 00:34:04 +02:00
|
|
|
}
|