2021-02-26 10:23:09 +00:00
|
|
|
/*
|
|
|
|
Copyright 2021 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
$topLevelHeight: 32px;
|
|
|
|
$nestedHeight: 24px;
|
2021-03-12 17:37:15 +00:00
|
|
|
$gutterSize: 16px;
|
|
|
|
$activeBorderTransparentGap: 1px;
|
2021-03-01 17:02:02 +00:00
|
|
|
|
|
|
|
$activeBackgroundColor: $roomtile-selected-bg-color;
|
2021-08-12 09:30:35 +00:00
|
|
|
$activeBorderColor: $secondary-content;
|
2021-02-26 10:23:09 +00:00
|
|
|
|
|
|
|
.mx_SpacePanel {
|
|
|
|
background-color: $groupFilterPanel-bg-color;
|
|
|
|
flex: 0 0 auto;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
2021-06-24 16:51:11 +00:00
|
|
|
position: relative;
|
2021-08-23 17:26:57 +00:00
|
|
|
// Fix for the blurred avatar-background
|
|
|
|
z-index: 1;
|
2021-02-26 10:23:09 +00:00
|
|
|
|
|
|
|
// Create another flexbox so the Panel fills the container
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
.mx_SpacePanel_spaceTreeWrapper {
|
|
|
|
flex: 1;
|
2021-04-20 10:12:47 +00:00
|
|
|
padding: 8px 8px 16px 0;
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_toggleCollapse {
|
|
|
|
flex: 0 0 auto;
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: 32px;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
margin-left: $gutterSize;
|
|
|
|
margin-bottom: 12px;
|
2021-08-24 07:02:17 +00:00
|
|
|
background-color: $roomlist-header-color;
|
2021-02-26 10:23:09 +00:00
|
|
|
mask-image: url('$(res)/img/element-icons/expand-space-panel.svg');
|
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
transform: scaleX(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
|
2021-04-20 10:12:47 +00:00
|
|
|
> .mx_SpaceItem {
|
|
|
|
padding-left: 16px;
|
|
|
|
}
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceButton_toggleCollapse {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
2021-06-03 07:32:36 +00:00
|
|
|
.mx_SpaceItem_dragging {
|
|
|
|
.mx_SpaceButton_toggleCollapse {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-15 11:59:46 +00:00
|
|
|
.mx_SpaceTreeLevel {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
max-width: 250px;
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
2021-03-01 17:02:02 +00:00
|
|
|
|
2021-03-15 11:59:46 +00:00
|
|
|
.mx_SpaceItem {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-flow: wrap;
|
2021-05-04 13:14:06 +00:00
|
|
|
|
|
|
|
&.mx_SpaceItem_narrow {
|
|
|
|
align-self: baseline;
|
|
|
|
}
|
2021-03-15 11:59:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceItem.collapsed {
|
2021-02-26 10:23:09 +00:00
|
|
|
& > .mx_SpaceButton > .mx_SpaceButton_toggleCollapse {
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
& > .mx_SpaceTreeLevel {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceItem:not(.hasSubSpaces) > .mx_SpaceButton {
|
|
|
|
margin-left: $gutterSize;
|
2021-03-15 11:59:46 +00:00
|
|
|
min-width: 40px;
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceButton {
|
|
|
|
border-radius: 8px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-03-15 11:59:46 +00:00
|
|
|
padding: 4px 4px 4px 0;
|
|
|
|
width: 100%;
|
2021-09-09 10:40:43 +00:00
|
|
|
cursor: pointer;
|
2021-03-01 17:02:02 +00:00
|
|
|
|
|
|
|
&.mx_SpaceButton_active {
|
|
|
|
&:not(.mx_SpaceButton_narrow) .mx_SpaceButton_selectionWrapper {
|
|
|
|
background-color: $activeBackgroundColor;
|
|
|
|
}
|
|
|
|
|
2021-03-12 17:37:15 +00:00
|
|
|
&.mx_SpaceButton_narrow .mx_SpaceButton_selectionWrapper {
|
|
|
|
padding: $activeBorderTransparentGap;
|
|
|
|
border: 3px $activeBorderColor solid;
|
2021-03-01 17:02:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceButton_selectionWrapper {
|
2021-03-15 11:59:46 +00:00
|
|
|
position: relative;
|
2021-03-01 17:02:02 +00:00
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
align-items: center;
|
2021-03-12 17:37:15 +00:00
|
|
|
border-radius: 12px;
|
|
|
|
padding: 4px;
|
2021-03-01 17:02:02 +00:00
|
|
|
}
|
2021-02-26 10:23:09 +00:00
|
|
|
|
2021-03-15 11:59:46 +00:00
|
|
|
&:not(.mx_SpaceButton_narrow) {
|
|
|
|
.mx_SpaceButton_selectionWrapper {
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-26 10:23:09 +00:00
|
|
|
.mx_SpaceButton_name {
|
|
|
|
flex: 1;
|
|
|
|
margin-left: 8px;
|
|
|
|
white-space: nowrap;
|
|
|
|
display: block;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
font-size: $font-14px;
|
|
|
|
line-height: $font-18px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceButton_toggleCollapse {
|
2021-03-12 17:37:15 +00:00
|
|
|
width: $gutterSize;
|
2021-02-26 10:23:09 +00:00
|
|
|
height: 20px;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: 20px;
|
|
|
|
mask-repeat: no-repeat;
|
2021-08-24 07:02:17 +00:00
|
|
|
background-color: $roomlist-header-color;
|
2021-02-26 10:23:09 +00:00
|
|
|
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
|
|
|
|
}
|
|
|
|
|
2021-03-01 17:02:02 +00:00
|
|
|
.mx_SpaceButton_icon {
|
2021-02-26 10:23:09 +00:00
|
|
|
width: $topLevelHeight;
|
|
|
|
min-width: $topLevelHeight;
|
|
|
|
height: $topLevelHeight;
|
|
|
|
border-radius: 8px;
|
2021-03-01 17:02:02 +00:00
|
|
|
position: relative;
|
2021-02-26 10:23:09 +00:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
position: absolute;
|
|
|
|
content: '';
|
|
|
|
width: $topLevelHeight;
|
|
|
|
height: $topLevelHeight;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
mask-position: center;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: 18px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-01 17:02:02 +00:00
|
|
|
&.mx_SpaceButton_home .mx_SpaceButton_icon {
|
2021-02-26 10:23:09 +00:00
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
background-color: #3f3d3d;
|
|
|
|
mask-image: url('$(res)/img/element-icons/home.svg');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-01 17:27:09 +00:00
|
|
|
&.mx_SpaceButton_new .mx_SpaceButton_icon {
|
|
|
|
background-color: $accent-color;
|
|
|
|
transition: all .1s ease-in-out; // TODO transition
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
background-color: #ffffff;
|
|
|
|
mask-image: url('$(res)/img/element-icons/plus.svg');
|
|
|
|
transition: all .2s ease-in-out; // TODO transition
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_SpaceButton_newCancel .mx_SpaceButton_icon {
|
|
|
|
background-color: $icon-button-color;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
}
|
2021-03-01 17:02:02 +00:00
|
|
|
|
2021-03-12 17:37:15 +00:00
|
|
|
.mx_BaseAvatar_image {
|
|
|
|
border-radius: 8px;
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
2021-03-02 14:34:47 +00:00
|
|
|
|
|
|
|
.mx_SpaceButton_menuButton {
|
|
|
|
width: 20px;
|
|
|
|
min-width: 20px; // yay flex
|
|
|
|
height: 20px;
|
|
|
|
margin-top: auto;
|
|
|
|
margin-bottom: auto;
|
|
|
|
display: none;
|
2021-09-14 14:00:44 +00:00
|
|
|
position: relative;
|
2021-03-02 14:34:47 +00:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
top: 2px;
|
|
|
|
left: 2px;
|
|
|
|
content: '';
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
position: absolute;
|
|
|
|
mask-position: center;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-image: url('$(res)/img/element-icons/context-menu.svg');
|
2021-08-12 09:27:12 +00:00
|
|
|
background: $primary-content;
|
2021-03-02 14:34:47 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-01 17:06:56 +00:00
|
|
|
}
|
2021-02-26 10:23:09 +00:00
|
|
|
|
|
|
|
.mx_SpacePanel_badgeContainer {
|
|
|
|
// Create a flexbox to make aligning dot badges easier
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.mx_NotificationBadge {
|
|
|
|
margin: 0 2px; // centering
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_dot {
|
|
|
|
// make the smaller dot occupy the same width for centering
|
2021-05-06 14:58:22 +00:00
|
|
|
margin: 0 7px;
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
.mx_SpaceButton {
|
|
|
|
.mx_SpacePanel_badgeContainer {
|
2021-09-14 14:00:44 +00:00
|
|
|
position: absolute;
|
2021-05-06 14:58:22 +00:00
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
.mx_NotificationBadge {
|
|
|
|
background-clip: padding-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_dot {
|
2021-05-07 09:22:56 +00:00
|
|
|
margin: 0 -1px 0 0;
|
2021-05-06 14:58:22 +00:00
|
|
|
border: 3px solid $groupFilterPanel-bg-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_NotificationBadge_2char,
|
|
|
|
.mx_NotificationBadge_3char {
|
|
|
|
margin: -5px -5px 0 0;
|
|
|
|
border: 2px solid $groupFilterPanel-bg-color;
|
|
|
|
}
|
2021-03-15 11:59:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_SpaceButton_active .mx_SpacePanel_badgeContainer {
|
|
|
|
// when we draw the selection border we move the relative bounds of our parent
|
|
|
|
// so update our position within the bounds of the parent to maintain position overall
|
2021-05-06 14:58:22 +00:00
|
|
|
right: -3px;
|
|
|
|
top: -3px;
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(.collapsed) {
|
|
|
|
.mx_SpaceButton:hover,
|
|
|
|
.mx_SpaceButton:focus-within,
|
|
|
|
.mx_SpaceButton_hasMenuOpen {
|
2021-07-28 16:40:33 +00:00
|
|
|
&:not(.mx_SpaceButton_invite) {
|
2021-04-12 10:55:47 +00:00
|
|
|
// Hide the badge container on hover because it'll be a menu button
|
|
|
|
.mx_SpacePanel_badgeContainer {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpaceButton_menuButton {
|
|
|
|
display: block;
|
|
|
|
}
|
2021-03-02 14:34:47 +00:00
|
|
|
}
|
2021-02-26 10:23:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* root space buttons are bigger and not indented */
|
|
|
|
& > .mx_AutoHideScrollbar {
|
|
|
|
& > .mx_SpaceButton {
|
|
|
|
height: $topLevelHeight;
|
|
|
|
|
|
|
|
&.mx_SpaceButton_active::before {
|
|
|
|
height: $topLevelHeight;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& > ul {
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-03-02 14:34:47 +00:00
|
|
|
|
|
|
|
.mx_SpacePanel_contextMenu {
|
|
|
|
.mx_SpacePanel_contextMenu_header {
|
|
|
|
margin: 12px 16px 12px;
|
|
|
|
font-weight: $font-semi-bold;
|
|
|
|
font-size: $font-15px;
|
|
|
|
line-height: $font-18px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_IconizedContextMenu_optionList .mx_AccessibleButton.mx_SpacePanel_contextMenu_inviteButton {
|
|
|
|
color: $accent-color;
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconInvite::before {
|
|
|
|
background-color: $accent-color;
|
|
|
|
mask-image: url('$(res)/img/element-icons/room/invite.svg');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconSettings::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/settings.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconLeave::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/leave.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconMembers::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/room/members.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconPlus::before {
|
2021-03-24 19:43:33 +00:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/plus-circle.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconHash::before {
|
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/hash-circle.svg');
|
2021-03-02 14:34:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_SpacePanel_iconExplore::before {
|
2021-03-24 19:43:33 +00:00
|
|
|
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
|
2021-03-02 14:34:47 +00:00
|
|
|
}
|
2021-07-28 18:33:07 +00:00
|
|
|
|
|
|
|
.mx_SpacePanel_noIcon {
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
& + .mx_IconizedContextMenu_label {
|
|
|
|
padding-left: 5px !important; // override default iconized label style to align with header
|
|
|
|
}
|
|
|
|
}
|
2021-03-02 14:34:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mx_SpacePanel_sharePublicSpace {
|
|
|
|
margin: 0;
|
|
|
|
}
|