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.
|
|
|
|
*/
|
|
|
|
|
2020-06-29 04:03:04 +02:00
|
|
|
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
|
2020-06-05 22:08:20 +02:00
|
|
|
|
2020-06-05 05:21:04 +02:00
|
|
|
// Note: the room tile expects to be in a flexbox column container
|
2020-06-05 00:34:04 +02:00
|
|
|
.mx_RoomTile2 {
|
2020-06-05 22:08:20 +02:00
|
|
|
margin-bottom: 4px;
|
|
|
|
padding: 4px;
|
2020-06-05 05:21:04 +02:00
|
|
|
|
|
|
|
// The tile is also a flexbox row itself
|
|
|
|
display: flex;
|
|
|
|
|
2020-07-02 23:21:10 +02:00
|
|
|
&.mx_RoomTile2_selected,
|
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
|
|
|
&.mx_RoomTile2_hasMenuOpen {
|
2020-06-05 22:08:20 +02:00
|
|
|
background-color: $roomtile2-selected-bg-color;
|
|
|
|
border-radius: 32px;
|
|
|
|
}
|
|
|
|
|
2020-07-02 21:50:25 +02:00
|
|
|
.mx_DecoratedRoomAvatar, .mx_RoomTile2_avatarContainer {
|
2020-06-05 05:21:04 +02:00
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile2_nameContainer {
|
2020-06-10 07:09:15 +02:00
|
|
|
flex-grow: 1;
|
2020-07-02 13:18:48 +02:00
|
|
|
min-width: 0; // allow flex to shrink it
|
|
|
|
margin-right: 8px; // spacing to buttons/badges
|
2020-06-10 07:09:15 +02:00
|
|
|
|
2020-06-05 05:21:04 +02:00
|
|
|
// Create a new column layout flexbox for the name parts
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.mx_RoomTile2_name,
|
|
|
|
.mx_RoomTile2_messagePreview {
|
|
|
|
margin: 0 2px;
|
2020-06-10 07:09:15 +02:00
|
|
|
width: 100%;
|
2020-06-05 05:21:04 +02:00
|
|
|
|
2020-06-10 07:09:15 +02:00
|
|
|
// Ellipsize any text overflow
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2020-06-05 05:21:04 +02:00
|
|
|
|
|
|
|
.mx_RoomTile2_name {
|
|
|
|
font-size: $font-14px;
|
2020-06-10 05:12:49 +02:00
|
|
|
line-height: $font-18px;
|
2020-06-05 05:21:04 +02:00
|
|
|
}
|
|
|
|
|
2020-06-08 21:42:18 +02:00
|
|
|
.mx_RoomTile2_name.mx_RoomTile2_nameHasUnreadEvents {
|
2020-06-19 23:43:05 +02:00
|
|
|
font-weight: 700;
|
2020-06-08 21:42:18 +02:00
|
|
|
}
|
|
|
|
|
2020-06-05 05:21:04 +02:00
|
|
|
.mx_RoomTile2_messagePreview {
|
|
|
|
font-size: $font-13px;
|
|
|
|
line-height: $font-18px;
|
|
|
|
color: $roomtile2-preview-color;
|
|
|
|
}
|
2020-06-10 05:12:49 +02:00
|
|
|
|
|
|
|
.mx_RoomTile2_nameWithPreview {
|
|
|
|
margin-top: -4px; // shift the name up a bit more
|
|
|
|
}
|
2020-06-05 05:21:04 +02:00
|
|
|
}
|
|
|
|
|
2020-07-02 13:18:48 +02:00
|
|
|
.mx_RoomTile2_menuButton {
|
|
|
|
margin-left: 4px; // spacing between buttons
|
|
|
|
}
|
|
|
|
|
2020-06-05 05:21:04 +02:00
|
|
|
.mx_RoomTile2_badgeContainer {
|
2020-07-02 13:35:06 +02:00
|
|
|
height: 16px;
|
|
|
|
// don't set width so that it takes no space when there is no badge to show
|
|
|
|
margin: auto 0; // vertically align
|
2020-06-05 05:21:04 +02:00
|
|
|
|
2020-07-02 21:39:20 +02:00
|
|
|
// Create a flexbox to make aligning dot badges easier
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2020-07-02 13:18:48 +02:00
|
|
|
.mx_NotificationBadge {
|
2020-07-02 13:35:06 +02:00
|
|
|
margin-right: 2px; // centering
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_dot {
|
|
|
|
// make the smaller dot occupy the same width for centering
|
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: 7px;
|
2020-07-02 13:18:48 +02:00
|
|
|
}
|
2020-06-05 05:21:04 +02:00
|
|
|
}
|
2020-06-10 07:09:15 +02:00
|
|
|
|
2020-07-01 14:59:50 +02:00
|
|
|
// The context menu buttons are hidden by default
|
2020-06-10 07:13:57 +02:00
|
|
|
.mx_RoomTile2_menuButton,
|
|
|
|
.mx_RoomTile2_notificationsButton {
|
2020-07-02 13:35:06 +02:00
|
|
|
width: 20px;
|
|
|
|
min-width: 20px; // yay flex
|
|
|
|
height: 20px;
|
|
|
|
margin: auto 0;
|
2020-06-10 07:09:15 +02:00
|
|
|
position: relative;
|
2020-06-30 01:16:51 +02:00
|
|
|
display: none;
|
2020-06-10 07:09:15 +02:00
|
|
|
|
|
|
|
&::before {
|
2020-06-30 01:16:51 +02:00
|
|
|
top: 2px;
|
|
|
|
left: 2px;
|
2020-06-10 07:09:15 +02:00
|
|
|
content: '';
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
position: absolute;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
background: $primary-fg-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-01 14:59:50 +02:00
|
|
|
// If the room has an overriden notification setting then we always show the notifications menu button
|
2020-06-30 01:16:51 +02:00
|
|
|
.mx_RoomTile2_notificationsButton.mx_RoomTile2_notificationsButton_show {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2020-06-10 07:09:15 +02:00
|
|
|
.mx_RoomTile2_menuButton::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/more-horizontal.svg');
|
|
|
|
}
|
|
|
|
|
2020-06-11 22:39:28 +02:00
|
|
|
&:not(.mx_RoomTile2_minimized) {
|
2020-07-02 23:21:10 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus-within,
|
|
|
|
&.mx_RoomTile2_hasMenuOpen {
|
2020-06-11 22:39:28 +02:00
|
|
|
// Hide the badge container on hover because it'll be a menu button
|
|
|
|
.mx_RoomTile2_badgeContainer {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2020-07-02 13:18:48 +02:00
|
|
|
display: none;
|
2020-06-11 22:39:28 +02:00
|
|
|
}
|
|
|
|
|
2020-06-30 01:16:51 +02:00
|
|
|
.mx_RoomTile2_notificationsButton,
|
2020-06-11 22:39:28 +02:00
|
|
|
.mx_RoomTile2_menuButton {
|
2020-06-30 01:16:51 +02:00
|
|
|
display: block;
|
2020-06-11 22:39:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_RoomTile2_minimized {
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
|
|
|
|
2020-07-02 22:05:31 +02:00
|
|
|
.mx_DecoratedRoomAvatar, .mx_RoomTile2_avatarContainer {
|
2020-06-11 22:39:28 +02:00
|
|
|
margin-right: 0;
|
2020-06-10 07:09:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-30 01:16:51 +02:00
|
|
|
// We use these both in context menus and the room tiles
|
|
|
|
.mx_RoomTile2_iconBell::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/bell.svg');
|
|
|
|
}
|
|
|
|
.mx_RoomTile2_iconBellDot::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/bell-notification.custom.svg');
|
|
|
|
}
|
|
|
|
.mx_RoomTile2_iconBellCrossed::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/bell-crossed.svg');
|
|
|
|
}
|
2020-07-01 14:59:50 +02:00
|
|
|
.mx_RoomTile2_iconBellMentions::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/bell-mentions.custom.svg');
|
|
|
|
}
|
2020-06-30 23:32:59 +02:00
|
|
|
.mx_RoomTile2_iconCheck::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/check.svg');
|
|
|
|
}
|
2020-06-30 01:16:51 +02:00
|
|
|
|
2020-06-10 07:09:15 +02:00
|
|
|
.mx_RoomTile2_contextMenu {
|
|
|
|
.mx_RoomTile2_contextMenu_redRow {
|
|
|
|
.mx_AccessibleButton {
|
|
|
|
color: $warning-color !important; // !important to override styles from context menu
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_IconizedContextMenu_icon::before {
|
|
|
|
background-color: $warning-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-30 23:32:59 +02:00
|
|
|
.mx_RoomTile2_contextMenu_activeRow {
|
|
|
|
&.mx_AccessibleButton, .mx_AccessibleButton {
|
|
|
|
color: $accent-color !important; // !important to override styles from context menu
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_IconizedContextMenu_icon::before {
|
|
|
|
background-color: $accent-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-10 07:09:15 +02:00
|
|
|
.mx_IconizedContextMenu_icon {
|
|
|
|
position: relative;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
position: absolute;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
background: $primary-fg-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile2_iconStar::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/star.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile2_iconArrowDown::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/arrow-down.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile2_iconSettings::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/settings.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_RoomTile2_iconSignOut::before {
|
|
|
|
mask-image: url('$(res)/img/feather-customised/sign-out.svg');
|
|
|
|
}
|
2020-06-05 00:34:04 +02:00
|
|
|
}
|