riot-web/res/css/views/dialogs/_InviteDialog.scss

236 lines
6.1 KiB
SCSS
Raw Normal View History

/*
Copyright 2019, 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.
*/
.mx_InviteDialog_addressBar {
2020-01-03 01:47:26 +01:00
display: flex;
flex-direction: row;
.mx_InviteDialog_editor {
2020-01-03 01:47:26 +01:00
flex: 1;
width: 100%; // Needed to make the Field inside grow
background-color: $user-tile-hover-bg-color;
border-radius: 4px;
min-height: 25px;
padding-left: 8px;
overflow-x: hidden;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
.mx_InviteDialog_userTile {
margin: 6px 6px 0 0;
display: inline-block;
min-width: max-content; // prevent manipulation by flexbox
}
// Mostly copied from AddressPickerDialog; overrides bunch of our default text input styles
> input[type="text"] {
margin: 6px 0 !important;
height: 24px;
line-height: $font-24px;
font-size: $font-14px;
padding-left: 12px;
border: 0 !important;
outline: 0 !important;
resize: none;
box-sizing: border-box;
min-width: 40%;
flex: 1 !important;
color: $primary-fg-color !important;
}
2020-01-03 01:47:26 +01:00
}
.mx_InviteDialog_goButton {
min-width: 48px;
2020-01-03 01:47:26 +01:00
margin-left: 10px;
height: 25px;
line-height: $font-25px;
2020-01-03 01:47:26 +01:00
}
.mx_InviteDialog_buttonAndSpinner {
.mx_Spinner {
// Width and height are required to trick the layout engine.
width: 20px;
height: 20px;
margin-left: 5px;
display: inline-block;
vertical-align: middle;
}
}
}
.mx_InviteDialog_section {
2020-01-03 01:47:26 +01:00
padding-bottom: 10px;
h3 {
font-size: $font-12px;
2020-01-03 01:47:26 +01:00
color: $muted-fg-color;
font-weight: bold;
text-transform: uppercase;
}
.mx_InviteDialog_subname {
margin-bottom: 10px;
margin-top: -10px; // HACK: Positioning with margins is bad
font-size: $font-12px;
color: $muted-fg-color;
}
}
.mx_InviteDialog_roomTile {
2020-01-03 01:47:26 +01:00
cursor: pointer;
padding: 5px 10px;
&:hover {
background-color: $user-tile-hover-bg-color;
border-radius: 4px;
}
* {
vertical-align: middle;
}
.mx_InviteDialog_roomTile_avatarStack {
2020-01-07 20:12:31 +01:00
display: inline-block;
position: relative;
width: 36px;
height: 36px;
2020-01-07 20:25:22 +01:00
& > * {
2020-01-07 20:12:31 +01:00
position: absolute;
top: 0;
left: 0;
}
}
.mx_InviteDialog_roomTile_selected {
2020-01-07 20:12:31 +01:00
width: 36px;
height: 36px;
border-radius: 36px;
background-color: $username-variant1-color;
display: inline-block;
position: relative;
&::before {
content: "";
width: 24px;
height: 24px;
grid-column: 1;
grid-row: 1;
mask-image: url("$(res)/img/feather-customised/check.svg");
2020-01-07 20:12:31 +01:00
mask-size: 100%;
mask-repeat: no-repeat;
position: absolute;
top: 6px; // 50%
left: 6px; // 50%
background-color: #ffffff; // this is fine without a var because it's for both themes
}
}
.mx_InviteDialog_roomTile_nameStack {
display: inline-block;
}
.mx_InviteDialog_roomTile_name {
2020-01-03 01:47:26 +01:00
font-weight: 600;
font-size: $font-14px;
2020-01-03 01:47:26 +01:00
color: $primary-fg-color;
margin-left: 7px;
}
.mx_InviteDialog_roomTile_userId {
font-size: $font-12px;
2020-01-03 01:47:26 +01:00
color: $muted-fg-color;
margin-left: 7px;
}
.mx_InviteDialog_roomTile_time {
2020-01-03 01:47:26 +01:00
text-align: right;
font-size: $font-12px;
2020-01-03 01:47:26 +01:00
color: $muted-fg-color;
float: right;
line-height: $font-36px; // Height of the avatar to keep the time vertically aligned
2020-01-03 01:47:26 +01:00
}
.mx_InviteDialog_roomTile_highlight {
font-weight: 900;
}
}
// Many of these styles are stolen from mx_UserPill, but adjusted for the invite dialog.
.mx_InviteDialog_userTile {
margin-right: 8px;
.mx_InviteDialog_userTile_pill {
background-color: $username-variant1-color;
border-radius: 12px;
display: inline-block;
height: 24px;
line-height: $font-24px;
padding-left: 8px;
padding-right: 8px;
color: #ffffff; // this is fine without a var because it's for both themes
.mx_InviteDialog_userTile_avatar {
border-radius: 20px;
position: relative;
left: -5px;
top: 2px;
}
img.mx_InviteDialog_userTile_avatar {
2020-01-07 20:25:22 +01:00
vertical-align: top;
}
.mx_InviteDialog_userTile_name {
vertical-align: top;
}
.mx_InviteDialog_userTile_threepidAvatar {
background-color: #ffffff; // this is fine without a var because it's for both themes
}
}
.mx_InviteDialog_userTile_remove {
display: inline-block;
margin-left: 4px;
}
}
.mx_InviteDialog {
// Prevent the dialog from jumping around randomly when elements change.
height: 590px;
padding-left: 20px; // the design wants some padding on the left
}
.mx_InviteDialog_userSections {
margin-top: 10px;
overflow-y: auto;
padding-right: 45px;
height: 455px; // mx_InviteDialog's height minus some for the upper elements
}
// Right margin for the design. We could apply this to the whole dialog, but then the scrollbar
// for the user section gets weird.
.mx_InviteDialog_helpText,
.mx_InviteDialog_addressBar {
margin-right: 45px;
}
.mx_InviteDialog_helpText .mx_AccessibleButton_kind_link {
padding: 0;
}