Spaces quick settings (#7196)

This commit is contained in:
Michael Telatynski 2021-11-26 15:41:04 +00:00 committed by GitHub
parent 138f6685d4
commit 9fefeefc8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 366 additions and 32 deletions

View file

@ -0,0 +1,176 @@
/*
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.
*/
.mx_QuickSettingsButton {
flex: 0 0 auto;
width: 32px;
height: 32px;
border-radius: 8px;
position: relative;
margin: 12px auto;
&::before {
content: "";
position: absolute;
width: inherit;
height: inherit;
mask-image: url('$(res)/img/element-icons/settings.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: 16px;
background: $secondary-content;
}
&:hover {
background-color: $quaternary-content;
&::before {
background-color: $primary-content;
}
}
}
.mx_QuickSettingsButton_ContextMenuWrapper .mx_ContextualMenu {
padding: 16px;
width: max-content;
min-width: 200px;
contain: unset; // let the dropdown paint beyond the context menu
> div > h2 {
font-weight: $font-semi-bold;
font-size: $font-15px;
line-height: $font-24px;
color: $primary-content;
margin: 0 0 16px;
}
.mx_AccessibleButton_kind_primary_outline {
display: block;
}
> div > h4 {
font-weight: $font-semi-bold;
font-size: $font-12px;
line-height: $font-15px;
text-transform: uppercase;
color: $tertiary-content;
margin: 20px 0 12px;
}
.mx_QuickSettingsButton_pinToSidebarHeading {
padding-left: 24px;
position: relative;
&::before {
background-color: $secondary-content;
content: "";
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
mask-image: url('$(res)/img/element-icons/room/pin-upright.svg');
width: 16px;
height: 16px;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
.mx_Checkbox {
margin-bottom: 8px;
}
.mx_QuickSettingsButton_favouritesCheckbox,
.mx_QuickSettingsButton_peopleCheckbox {
.mx_Checkbox_background + div {
padding-left: 22px;
position: relative;
margin-left: 6px;
font-size: $font-15px;
line-height: $font-24px;
color: $secondary-content;
&::before {
background-color: $secondary-content;
content: "";
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
width: 16px;
height: 16px;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
}
.mx_QuickSettingsButton_favouritesCheckbox .mx_Checkbox_background + div::before {
mask-image: url('$(res)/img/element-icons/roomlist/favorite.svg');
}
.mx_QuickSettingsButton_peopleCheckbox .mx_Checkbox_background + div::before {
mask-image: url('$(res)/img/element-icons/room/members.svg');
}
.mx_QuickSettingsButton_moreOptionsButton {
padding-left: 22px;
margin-left: 22px;
font-size: $font-15px;
line-height: $font-24px;
color: $secondary-content;
position: relative;
margin-bottom: 16px;
&::before {
background-color: $secondary-content;
content: "";
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
width: 16px;
height: 16px;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
mask-image: url('$(res)/img/element-icons/room/ellipsis.svg');
}
}
.mx_QuickSettingsButton_themePicker {
display: flex;
align-items: center;
> h4 {
font-weight: $font-semi-bold;
font-size: $font-12px;
line-height: $font-15px;
color: $secondary-content;
text-transform: uppercase;
display: inline-block;
margin: 0;
}
.mx_Dropdown {
min-width: 100px;
margin-left: auto;
height: min-content;
}
}
}